AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  AIX 5.2 view who has what files open

    Posted Tue November 26, 2013 11:29 AM

    Originally posted by: cpguru


    I am wondering if someone can help me with syntax of a command.

    What im trying to do:

    -I am trying to get a listing of what user has what file open right before a kill script is run.  The kill script we have works fine, just want a list >to a file of what user has what open for files.

    I am assuming I want to use a variant of the who command, maybe with the -o option, but after playing around with it for a bit, I cant seem to get a list of open files.

     

    Can someone here please help?

    Knowledge level here is beginner.

    Thanks!



  • 2.  Re: AIX 5.2 view who has what files open

    Posted Wed November 27, 2013 05:08 PM

    Originally posted by: talex


    Try lsof



  • 3.  Re: AIX 5.2 view who has what files open

    Posted Thu November 28, 2013 03:20 PM

    Originally posted by: dukessd


    I think lsof is in the AIX expansion pack but you'll probably have fuser installed by default so that's worth a try.

    HTH.



  • 4.  Re: AIX 5.2 view who has what files open

    Posted Fri November 29, 2013 09:20 AM

    Originally posted by: cpguru


    Thanks Talex & Dukessd.  I do not have the expansion pack apperantly as I do not have lsof, although that looks like exactly what I am looking for.

    In reviewing the man page for fuser, I am not sure this is going to give me exactly what I want.  The ps -ef command actually gets me closer to a list of who is in what, however it does not tell me what file the user is in (has open?).

    Thanks for the help though.  I appreciate the responses!



  • 5.  Re: AIX 5.2 view who has what files open

    Posted Fri November 29, 2013 09:56 AM

    Originally posted by: The_Doctor


    if it's lsof you want..... I'd suggest you look into this site ->  http://www.bullfreeware.com/

    search on lsof ...... refine the results to AIX 5.2 ...... download the binary & install (I assume you have no capability to compile the source).

     



  • 6.  Re: AIX 5.2 view who has what files open

    Posted Fri November 29, 2013 10:31 AM

    Originally posted by: cpguru


    Thank you very much for the link Doc.  I am downloading and installing now.

     

    Thanks all.



  • 7.  Re: AIX 5.2 view who has what files open

    Posted Fri November 29, 2013 10:50 AM

    Originally posted by: cpguru


    Doc,

     

    lsof installed successfully and am learning now.  Thanks again for directing me to the site to download.