<?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: lsof does not grap all ports in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/lsof-does-not-grap-all-ports/m-p/4517796#M366591</link>
    <description>Where in the output you send was the package name displayed?</description>
    <pubDate>Tue, 20 Oct 2009 20:47:59 GMT</pubDate>
    <dc:creator>HP-UX User_1</dc:creator>
    <dc:date>2009-10-20T20:47:59Z</dc:date>
    <item>
      <title>lsof does not grap all ports</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lsof-does-not-grap-all-ports/m-p/4517789#M366584</link>
      <description>I install lsof on HPUX 11.11, configuration and generation of binaries went fine. i was able to list every port including the TCP ports, however every other user is unable to list the TCP port even when the port number is specified. Below is the msg as root user and non root user&lt;BR /&gt;$ ps     &lt;BR /&gt;   PID TTY       TIME COMMAND&lt;BR /&gt; 18118 pts/te    0:00 ps&lt;BR /&gt; 22202 pts/te    0:00 sh&lt;BR /&gt; 22201 pts/te    0:00 telnetd&lt;BR /&gt;$ lsof -p 22201&lt;BR /&gt;$ lsof&lt;BR /&gt;COMMAND   PID     USER   FD   TYPE     DEVICE SIZE/OFF  NODE NAME&lt;BR /&gt;lsof    18120 csuadmin  cwd    DIR    105,0x4       96 12536 /users (wsgnfs:/us)&lt;BR /&gt;lsof    18120 csuadmin  txt    REG     64,0xb   118784 34158 /usr/local/bin/lsof&lt;BR /&gt;lsof    18120 csuadmin  mem    REG     64,0x8   135168 25984 /opt/star-ncf-prod2&lt;BR /&gt;lsof    18120 csuadmin  mem    REG     64,0xb   753664 14596 /usr/lib/libnsl.1&lt;BR /&gt;lsof    18120 csuadmin  mem    REG     64,0xb    24576 16708 /usr/lib/libdld.2&lt;BR /&gt;lsof    18120 csuadmin  mem    REG     64,0xb  1839104   125 /usr/lib/libc.2&lt;BR /&gt;lsof    18120 csuadmin  mem    REG     64,0xb   393216 16706 /usr/lib/dld.sl&lt;BR /&gt;lsof    18120 csuadmin    0u   STR     33,0x4  0t14800   662 /dev/pts/te-&amp;gt;ldters&lt;BR /&gt;lsof    18120 csuadmin    1u   STR     33,0x4  0t14800   662 /dev/pts/te-&amp;gt;ldters&lt;BR /&gt;lsof    18120 csuadmin    2u   STR     33,0x4  0t14800   662 /dev/pts/te-&amp;gt;ldters&lt;BR /&gt;lsof    18120 csuadmin    5w  FIFO 0x70c57c48      0t0 28251 &lt;BR /&gt;lsof    18120 csuadmin    6r  FIFO 0x70c571c8      0t0 28252 &lt;BR /&gt;sh      22202 csuadmin  cwd    DIR    105,0x4       96 12536 /users (wsgnfs:/us)&lt;BR /&gt;sh      22202 csuadmin  txt    REG     64,0xb   208896 16629 /usr/bin/sh&lt;BR /&gt;sh      22202 csuadmin  mem    REG     64,0xb    24576 16708 /usr/lib/libdld.2&lt;BR /&gt;sh      22202 csuadmin  mem    REG     64,0xb  1839104   125 /usr/lib/libc.2&lt;BR /&gt;sh      22202 csuadmin  mem    REG     64,0xb   393216 16706 /usr/lib/dld.sl&lt;BR /&gt;sh      22202 csuadmin    0u                                 &lt;BR /&gt;sh      22202 csuadmin    1u   STR     33,0x4  0t14800   662 /dev/pts/te-&amp;gt;ldters&lt;BR /&gt;sh      22202 csuadmin    2u   STR     33,0x4  0t14800   662 /dev/pts/te-&amp;gt;ldters&lt;BR /&gt;sh      22202 csuadmin    5w  FIFO 0x70c57c48      0t0 28251 &lt;BR /&gt;sh      24676 csuadmin  cwd    DIR    105,0x4       96 12536 /users (wsgnfs:/us)&lt;BR /&gt;sh      24676 csuadmin  txt    REG     64,0xb   208896 16629 /usr/bin/sh&lt;BR /&gt;sh      24676 csuadmin  mem    REG     64,0xb    24576 16708 /usr/lib/libdld.2&lt;BR /&gt;sh      24676 csuadmin  mem    REG     64,0xb  1839104   125 /usr/lib/libc.2&lt;BR /&gt;sh      24676 csuadmin  mem    REG     64,0xb   393216 16706 /usr/lib/dld.sl&lt;BR /&gt;sh      24676 csuadmin    0u                                 &lt;BR /&gt;sh      24676 csuadmin    1u   STR     33,0x4  0t14800   662 /dev/pts/te-&amp;gt;ldters&lt;BR /&gt;sh      24676 csuadmin    2u   STR     33,0x4  0t14800   662 /dev/pts/te-&amp;gt;ldters&lt;BR /&gt;sh      24676 csuadmin    5w  FIFO 0x70c57c48      0t0 28251 &lt;BR /&gt;sh      24676 csuadmin    6r  FIFO 0x70c571c8      0t0 28252 &lt;BR /&gt;sh      24676 csuadmin    0u  UNKN                           no more information&lt;BR /&gt;tstbe1# /&amp;gt;lsof -p 22201&lt;BR /&gt;COMMAND   PID USER   FD   TYPE      DEVICE SIZE/OFF  NODE NAME&lt;BR /&gt;telnetd 22201 root  cwd    DIR      64,0x5     8192     2 /&lt;BR /&gt;telnetd 22201 root  txt    REG      64,0xb    98304 10155 /usr/lbin/telnetd&lt;BR /&gt;telnetd 22201 root  mem    REG      64,0xb    53248  6085 /usr/lib/libnss_files.&lt;BR /&gt;1&lt;BR /&gt;telnetd 22201 root  mem    REG      64,0x8   135168 25984 /opt/star-ncf-prod/ep_&lt;BR /&gt;patch/usr/lib/libxti.2&lt;BR /&gt;telnetd 22201 root  mem    REG      64,0xb   753664 14596 /usr/lib/libnsl.1&lt;BR /&gt;telnetd 22201 root  mem    REG      64,0xb    45056 14659 /usr/lib/libnss_nis.1&lt;BR /&gt;telnetd 22201 root  mem    REG      64,0xb  1044480   112 /usr/lib/libsis.sl&lt;BR /&gt;telnetd 22201 root  mem    REG      64,0xb    24576 16708 /usr/lib/libdld.2&lt;BR /&gt;telnetd 22201 root  mem    REG      64,0xb  1839104   125 /usr/lib/libc.2&lt;BR /&gt;telnetd 22201 root  mem    REG      64,0xb   393216 16706 /usr/lib/dld.sl&lt;BR /&gt;telnetd 22201 root  mem    REG      64,0xc      532  2019 /var/spool/pwgr/status&lt;BR /&gt;telnetd 22201 root    0u  IPv4  0x726f9e00      0t0   TCP tsgbe1:telnet-&amp;gt;10.10.4&lt;BR /&gt;.134:1335 (ESTABLISHED)&lt;BR /&gt;telnetd 22201 root    1u  IPv4  0x726f9e00      0t0   TCP tsgbe1:telnet-&amp;gt;10.10.4&lt;BR /&gt;.134:1335 (ESTABLISHED)&lt;BR /&gt;telnetd 22201 root    2u  IPv4  0x726f9e00      0t0   TCP tsgbe1:telnet-&amp;gt;10.10.4&lt;BR /&gt;.134:1335 (ESTABLISHED)&lt;BR /&gt;telnetd 22201 root    3u   STR 22,0x240005      0t0    85 /dev/udp-&amp;gt;udpm-&amp;gt;ip&lt;BR /&gt;telnetd 22201 root    4u   STR      32,0x4    0t110  1357 /dev/telnetm-&amp;gt;pckt-&amp;gt;te&lt;BR /&gt;lm&lt;BR /&gt;telnetd 22201 root    5u  unix      64,0xc      0t0    97 /var/spool/sockets/pwg&lt;BR /&gt;r/client22201 (0x79c17640)&lt;BR /&gt;telnetd 22201 root    7r   REG      64,0x5       49  5801 /etc/issue&lt;BR /&gt;tstbe1# /&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Can anyone help with this issue?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Oct 2009 19:44:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lsof-does-not-grap-all-ports/m-p/4517789#M366584</guid>
      <dc:creator>HP-UX User_1</dc:creator>
      <dc:date>2009-10-20T19:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: lsof does not grap all ports</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lsof-does-not-grap-all-ports/m-p/4517790#M366585</link>
      <description>In the example given:&lt;BR /&gt;$ ps &lt;BR /&gt;PID TTY TIME COMMAND&lt;BR /&gt;18118 pts/te 0:00 ps&lt;BR /&gt;22202 pts/te 0:00 sh&lt;BR /&gt;22201 pts/te 0:00 telnetd&lt;BR /&gt;$ lsof -p 22201&lt;BR /&gt;&lt;BR /&gt;22201 is *not* a port number, its a process identifer..&lt;BR /&gt;&lt;BR /&gt;what happens if the non-root user runs this *on a process they own*?</description>
      <pubDate>Tue, 20 Oct 2009 19:56:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lsof-does-not-grap-all-ports/m-p/4517790#M366585</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2009-10-20T19:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: lsof does not grap all ports</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lsof-does-not-grap-all-ports/m-p/4517791#M366586</link>
      <description>non-root user cannot display the process. It does not even show up see below&lt;BR /&gt;&lt;BR /&gt;$ ps&lt;BR /&gt;   PID TTY       TIME COMMAND&lt;BR /&gt; 22202 pts/te    0:00 sh&lt;BR /&gt; 22201 pts/te    0:00 telnetd&lt;BR /&gt; 19912 pts/te    0:00 ps&lt;BR /&gt;$ lsof -p 22201&lt;BR /&gt;$</description>
      <pubDate>Tue, 20 Oct 2009 20:02:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lsof-does-not-grap-all-ports/m-p/4517791#M366586</guid>
      <dc:creator>HP-UX User_1</dc:creator>
      <dc:date>2009-10-20T20:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: lsof does not grap all ports</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lsof-does-not-grap-all-ports/m-p/4517792#M366587</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;22202 is a PID, isnÂ´t a port number.&lt;BR /&gt;&lt;BR /&gt;For example to find all the processes associated with port 23 (telnet), you can specify either the port number or name&lt;BR /&gt;&lt;BR /&gt;lsof -i :23&lt;BR /&gt;or&lt;BR /&gt;lsof -i :telnet&lt;BR /&gt;&lt;BR /&gt;then when the process id is displayed:&lt;BR /&gt;lsof -p PID&lt;BR /&gt;&lt;BR /&gt;Buena suerte..!!!&lt;BR /&gt;&lt;BR /&gt;JEA</description>
      <pubDate>Tue, 20 Oct 2009 20:04:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lsof-does-not-grap-all-ports/m-p/4517792#M366587</guid>
      <dc:creator>Julián Aimar</dc:creator>
      <dc:date>2009-10-20T20:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: lsof does not grap all ports</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lsof-does-not-grap-all-ports/m-p/4517793#M366588</link>
      <description>If lsof is run as a non-root user, it will show information about processes belonging to that user only. This is a compile-time option in lsof, and it's enabled by default. &lt;BR /&gt;&lt;BR /&gt;If this feature is disallowed, it allows users to spy on each other with lsof. This is bad for security.&lt;BR /&gt;&lt;BR /&gt;Although the lsof command is setuid root (it must be, or it cannot work!), it can detect whether it's run by a non-root user or a real root. (Just like the "passwd" command: passwd is setuid root, but it still won't allow ordinary users to change other users' passwords.)&lt;BR /&gt;&lt;BR /&gt;And by the way: lsof -p 22201 is not related to TCP ports at all. It displays the files and sockets opened by the process that has PID number 22201.&lt;BR /&gt;&lt;BR /&gt;To display processes by TCP port, the syntax is "lsof -i tcp:&lt;PORTNUMBER&gt;". For example,&lt;BR /&gt;running "lsof -i tcp:22" will report the sshd process if it's running on the system. But because sshd normally runs as root, you must be root to get the answer!&lt;BR /&gt;&lt;BR /&gt;MK&lt;/PORTNUMBER&gt;</description>
      <pubDate>Tue, 20 Oct 2009 20:09:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lsof-does-not-grap-all-ports/m-p/4517793#M366588</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2009-10-20T20:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: lsof does not grap all ports</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lsof-does-not-grap-all-ports/m-p/4517794#M366589</link>
      <description>I understand the security risk, however I need to use this to grab the package name on system running serviceguard. Unless anybody has other suggestions this is the only option that HP recommended. I need to subtitute system name with package name on the PS1 prompt when user log on with the package IP. Is there any other way of doing this without jeopardizng the security</description>
      <pubDate>Tue, 20 Oct 2009 20:18:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lsof-does-not-grap-all-ports/m-p/4517794#M366589</guid>
      <dc:creator>HP-UX User_1</dc:creator>
      <dc:date>2009-10-20T20:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: lsof does not grap all ports</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lsof-does-not-grap-all-ports/m-p/4517795#M366590</link>
      <description>nlxsms01:nl11588&amp;gt; sudo lsof -i 4 -a -p 6025&lt;BR /&gt;COMMAND  PID USER   FD   TYPE     DEVICE SIZE/OFF NODE NAME&lt;BR /&gt;telnetd 6025 root    0u  inet 0x4e89a880      0t0  TCP localhost:* (ESTABLISHED)&lt;BR /&gt;telnetd 6025 root    1u  inet 0x4e89a880      0t0  TCP localhost:* (ESTABLISHED)&lt;BR /&gt;telnetd 6025 root    2u  inet 0x4e89a880      0t0  TCP localhost:* (ESTABLISHED)&lt;BR /&gt;nlxsms01:nl11588&amp;gt; &lt;BR /&gt;&lt;BR /&gt;lsof -i -n -P |grep  LISTEN |grep inetd&lt;BR /&gt;inetd      2200  root    5u  inet 0x48a0f040      0t0  TCP *:21 (LISTEN)&lt;BR /&gt;inetd      2200  root    6u  inet 0x48a0f340      0t0  TCP *:23 (LISTEN)&lt;BR /&gt;inetd      2200  root    8u  inet 0x48c07380      0t0  TCP *:513 (LISTEN)&lt;BR /&gt;inetd      2200  root    9u  inet 0x48a0fac0      0t0  TCP *:514 (LISTEN)&lt;BR /&gt;inetd      2200  root   10u  inet 0x48a0f940      0t0  TCP *:512 (LISTEN)&lt;BR /&gt;inetd      2200  root   11u  inet 0x48a0f7c0      0t0  TCP *:113 (LISTEN)&lt;BR /&gt;inetd      2200  root   13u  inet 0x48a0f4c0      0t0  TCP *:1712 (LISTEN)&lt;BR /&gt;inetd      2200  root   14u  inet 0x48c07080      0t0  TCP *:5303 (LISTEN)&lt;BR /&gt;inetd      2200  root   16u  inet 0x48a0fc40      0t0  TCP *:5302 (LISTEN)</description>
      <pubDate>Tue, 20 Oct 2009 20:25:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lsof-does-not-grap-all-ports/m-p/4517795#M366590</guid>
      <dc:creator>F Verschuren</dc:creator>
      <dc:date>2009-10-20T20:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: lsof does not grap all ports</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lsof-does-not-grap-all-ports/m-p/4517796#M366591</link>
      <description>Where in the output you send was the package name displayed?</description>
      <pubDate>Tue, 20 Oct 2009 20:47:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lsof-does-not-grap-all-ports/m-p/4517796#M366591</guid>
      <dc:creator>HP-UX User_1</dc:creator>
      <dc:date>2009-10-20T20:47:59Z</dc:date>
    </item>
  </channel>
</rss>

