<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: File Descriptors in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/file-descriptors/m-p/2686069#M932444</link>
    <description>An alternative to lsof which may work in your case is glance.  Just select the process you want to look at, then go to the open files screen and you will have a list of all files that process has open.&lt;BR /&gt;&lt;BR /&gt;Not as flexible as lsof, because you have to know the pid first.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Steve</description>
    <pubDate>Tue, 19 Mar 2002 17:07:18 GMT</pubDate>
    <dc:creator>Steven Gillard_2</dc:creator>
    <dc:date>2002-03-19T17:07:18Z</dc:date>
    <item>
      <title>File Descriptors</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-descriptors/m-p/2686062#M932437</link>
      <description>Hi, I've got a 3rd Party scheduler which runs unix scripts on my machines. The scheduler re-directs stdout to a file on my machine. My problem is that from within the script being executed I want to find the name of the log file (which the scheduler automatically generates). I have been thinking along the line of interrogating the file descriptors, but there doesn't seem to be a way of doing this. &lt;BR /&gt;Thanks for any help.</description>
      <pubDate>Tue, 19 Mar 2002 13:37:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-descriptors/m-p/2686062#M932437</guid>
      <dc:creator>Joe Kane</dc:creator>
      <dc:date>2002-03-19T13:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: File Descriptors</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-descriptors/m-p/2686063#M932438</link>
      <description>Joe,&lt;BR /&gt;&lt;BR /&gt;get a copy of lsof:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.61/" target="_blank"&gt;http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.61/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;and use it to find your process and open files from within your script.&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Tue, 19 Mar 2002 13:44:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-descriptors/m-p/2686063#M932438</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-03-19T13:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: File Descriptors</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-descriptors/m-p/2686064#M932439</link>
      <description>use lsof&lt;BR /&gt;&lt;BR /&gt;Ciao&lt;BR /&gt;Federico</description>
      <pubDate>Tue, 19 Mar 2002 14:49:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-descriptors/m-p/2686064#M932439</guid>
      <dc:creator>federico_3</dc:creator>
      <dc:date>2002-03-19T14:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: File Descriptors</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-descriptors/m-p/2686065#M932440</link>
      <description>For example syslogd, the pid is 531.&lt;BR /&gt;&lt;BR /&gt;server# /opt/lsof/bin/lsof -p 531 &lt;BR /&gt;COMMAND PID USER   FD   TYPE    DEVICE SIZE/OFF  NODE NAME&lt;BR /&gt;syslogd 531 root  cwd   VDIR    64,0x3     1024     2 /&lt;BR /&gt;syslogd 531 root  txt   VREG    64,0x7    36864 20338 /usr (/dev/vg00/lvol7)&lt;BR /&gt;syslogd 531 root  mem   VREG    64,0x7    40960   109 /usr/lib/libnss_files.1&lt;BR /&gt;syslogd 531 root  mem   VREG    64,0x7    20480 20348 /usr/lib/libdld.2&lt;BR /&gt;syslogd 531 root  mem   VREG    64,0x7  1552384 18166 /usr/lib/libc.2&lt;BR /&gt;syslogd 531 root  mem   VREG    64,0x7   126976 20346 /usr/lib/dld.sl&lt;BR /&gt;syslogd 531 root    0r  VDIR    64,0x3     1024     2 /&lt;BR /&gt;syslogd 531 root    1r  VDIR    64,0x3     1024     2 /&lt;BR /&gt;syslogd 531 root    2r  VDIR    64,0x3     1024     2 /&lt;BR /&gt;syslogd 531 root    3r  FIFO    64,0x3   0t2048  1246 / (/dev/vg00/lvol3) rd=0x800&lt;BR /&gt;syslogd 531 root    4w  FIFO    64,0x3   0t2048  1246 / (/dev/vg00/lvol3) wr=0x800&lt;BR /&gt;syslogd 531 root    5u  unix 0x30b5300      0t0       /dev/log.un&lt;BR /&gt;syslogd 531 root    6u  inet 0x30ace40      0t0   UDP *:syslog (Idle)&lt;BR /&gt;syslogd 531 root    7r  VCHR     189,0   0t2246   931 /dev/klog&lt;BR /&gt;syslogd 531 root    9w  VREG    64,0x8     4009   529 /var/adm/syslog/mail.log&lt;BR /&gt;syslogd 531 root   10w  VREG    64,0x8    44621   990 /var/adm/syslog/syslog.log&lt;BR /&gt;syslogd 531 root   11w  VCHR       0,0      0t0    67 /dev/console&lt;BR /&gt;&lt;BR /&gt;GL,&lt;BR /&gt;C</description>
      <pubDate>Tue, 19 Mar 2002 15:04:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-descriptors/m-p/2686065#M932440</guid>
      <dc:creator>Craig Rants</dc:creator>
      <dc:date>2002-03-19T15:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: File Descriptors</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-descriptors/m-p/2686066#M932441</link>
      <description>Joe,&lt;BR /&gt;&lt;BR /&gt;code sniplet for KSH using lsof:&lt;BR /&gt;&lt;BR /&gt;WHOAMI=$$&lt;BR /&gt;#&lt;BR /&gt;# note: 0u=tty, 1u=stdout, 2u=stderr&lt;BR /&gt;# also tr is used to remove all extra spaces, &lt;BR /&gt;# TWO SPACES in first pair of quotes, then &lt;BR /&gt;# ONE SPACE in second pair of quotes&lt;BR /&gt;#&lt;BR /&gt;WHATisSTDTTY=`/usr/local/bin/lsof -p $WHOAMI|grep " 0u "|tr -s "  " " "|cut -d"&lt;BR /&gt;" -f9`&lt;BR /&gt;WHATisSTDOUT=`/usr/local/bin/lsof -p $WHOAMI|grep " 1u "|tr -s "  " " "|cut -d"&lt;BR /&gt;" -f9`&lt;BR /&gt;WHATisSTDERR=`/usr/local/bin/lsof -p $WHOAMI|grep " 2u "|tr -s "  " " "|cut -d"&lt;BR /&gt;" -f9`&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Tue, 19 Mar 2002 15:19:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-descriptors/m-p/2686066#M932441</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-03-19T15:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: File Descriptors</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-descriptors/m-p/2686067#M932442</link>
      <description>Thanks to everyone. I had already looked at lsof, but this was not considered as it's not a core HP functional process (Company policy). &lt;BR /&gt;Can't think of another way.</description>
      <pubDate>Tue, 19 Mar 2002 15:38:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-descriptors/m-p/2686067#M932442</guid>
      <dc:creator>Joe Kane</dc:creator>
      <dc:date>2002-03-19T15:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: File Descriptors</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-descriptors/m-p/2686068#M932443</link>
      <description>Joe,&lt;BR /&gt;&lt;BR /&gt;THIS is from the HP PORTING site, and is just like "perl", "emacs", "gzip/gunzip", "CIFS/9000 (samba)", "netscape browser", "apache", "JAVA", "ssh", "SSL", "vi", "awk", "sed", and about a thousand+ other things that HP doesn't write or OWN. THEY PORTED it!&lt;BR /&gt;&lt;BR /&gt;My company had the same LAME policy, until I explained the ABOVE to them!&lt;BR /&gt;&lt;BR /&gt;Without OPEN SOURCE, unix would be DEAD and we'd all be running M$ crap everywhere!&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Tue, 19 Mar 2002 15:49:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-descriptors/m-p/2686068#M932443</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-03-19T15:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: File Descriptors</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-descriptors/m-p/2686069#M932444</link>
      <description>An alternative to lsof which may work in your case is glance.  Just select the process you want to look at, then go to the open files screen and you will have a list of all files that process has open.&lt;BR /&gt;&lt;BR /&gt;Not as flexible as lsof, because you have to know the pid first.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Steve</description>
      <pubDate>Tue, 19 Mar 2002 17:07:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-descriptors/m-p/2686069#M932444</guid>
      <dc:creator>Steven Gillard_2</dc:creator>
      <dc:date>2002-03-19T17:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: File Descriptors</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/file-descriptors/m-p/2686070#M932445</link>
      <description>Thanks,&lt;BR /&gt;Yes indeed glance gives it. I haven't given up on lsof because it might be easier to make part of a script.&lt;BR /&gt;I haven't used glance much, I can't see a way of using this within a script though (I can easily get the pid), it only seems to work interactively.&lt;BR /&gt;&lt;BR /&gt;The search contiues...</description>
      <pubDate>Fri, 22 Mar 2002 12:10:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/file-descriptors/m-p/2686070#M932445</guid>
      <dc:creator>Joe Kane</dc:creator>
      <dc:date>2002-03-22T12:10:14Z</dc:date>
    </item>
  </channel>
</rss>

