HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: executable name in ps command
Operating System - HP-UX
1833875
Members
3300
Online
110063
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2003 09:12 AM
03-26-2003 09:12 AM
executable name in ps command
Hi,
When I use ps command to look for a process, the process name returned in some cases are listed by its implied path.
example:
olympus!jl1521dv:~ [37]> ps -aefl | grep -v grep | grep ChkImmediate
1 S sbcdtest 8697 1 0 168 20 42ad9800 2129 597451c0 Mar 24 ? 0:15 ChkImmediate
In this example, ChkImmediate could be from any directories.
What I would like to do is to find out which directory ChkImmediate came from.
Any suggestions will greatly help.
Thanks.
JW
When I use ps command to look for a process, the process name returned in some cases are listed by its implied path.
example:
olympus!jl1521dv:~ [37]> ps -aefl | grep -v grep | grep ChkImmediate
1 S sbcdtest 8697 1 0 168 20 42ad9800 2129 597451c0 Mar 24 ? 0:15 ChkImmediate
In this example, ChkImmediate could be from any directories.
What I would like to do is to find out which directory ChkImmediate came from.
Any suggestions will greatly help.
Thanks.
JW
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2003 09:14 AM
03-26-2003 09:14 AM
Re: executable name in ps command
As root
find / -name ChkImmediate
SEP
find / -name ChkImmediate
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2003 09:23 AM
03-26-2003 09:23 AM
Re: executable name in ps command
Or use lsof
a5:/ 104 # ps
PID TTY TIME COMMAND
18814 ttyp1 0:00 tcsh
18850 ttyp1 0:00 ps
a5:/ 105 # lsof -p 18814
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
tcsh 18814 root cwd VDIR 64,0x3 8192 2 /
tcsh 18814 root txt VREG 64,0xb 425984 56 /pro/bin/tcsh
tcsh 18814 root mem VREG 64,0x7 40960 1766 /usr/lib/libnss_files.1
tcsh 18814 root mem VREG 64,0x7 24576 17843 /usr/lib/libdld.2
tcsh 18814 root mem VREG 64,0x7 1552384 15720 /usr/lib/libc.2
tcsh 18814 root mem VREG 64,0x7 188416 17841 /usr/lib/dld.sl
tcsh 18814 root mem VREG 64,0x8 532 3443 /var/spool/pwgr/status
tcsh 18814 root 15u VCHR 17,0x1 0t2021 1280 /dev/pty/ttyp1
tcsh 18814 root 16u VCHR 17,0x1 0t2021 1280 /dev/pty/ttyp1
tcsh 18814 root 17u VCHR 17,0x1 0t2021 1280 /dev/pty/ttyp1
tcsh 18814 root 18u VCHR 17,0x1 0t2021 1280 /dev/pty/ttyp1
tcsh 18814 root 19u VCHR 17,0x1 0t2021 1280 /dev/pty/ttyp1
a5:/ 106 #
as you can see in the third line of output, the location of the command is /pro/bin/tcsh
[ BTW this is much more reliable than the find command, since commands can change the name they appear under in ps ]
Enjoy, have FUN! H.Merijn
a5:/ 104 # ps
PID TTY TIME COMMAND
18814 ttyp1 0:00 tcsh
18850 ttyp1 0:00 ps
a5:/ 105 # lsof -p 18814
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
tcsh 18814 root cwd VDIR 64,0x3 8192 2 /
tcsh 18814 root txt VREG 64,0xb 425984 56 /pro/bin/tcsh
tcsh 18814 root mem VREG 64,0x7 40960 1766 /usr/lib/libnss_files.1
tcsh 18814 root mem VREG 64,0x7 24576 17843 /usr/lib/libdld.2
tcsh 18814 root mem VREG 64,0x7 1552384 15720 /usr/lib/libc.2
tcsh 18814 root mem VREG 64,0x7 188416 17841 /usr/lib/dld.sl
tcsh 18814 root mem VREG 64,0x8 532 3443 /var/spool/pwgr/status
tcsh 18814 root 15u VCHR 17,0x1 0t2021 1280 /dev/pty/ttyp1
tcsh 18814 root 16u VCHR 17,0x1 0t2021 1280 /dev/pty/ttyp1
tcsh 18814 root 17u VCHR 17,0x1 0t2021 1280 /dev/pty/ttyp1
tcsh 18814 root 18u VCHR 17,0x1 0t2021 1280 /dev/pty/ttyp1
tcsh 18814 root 19u VCHR 17,0x1 0t2021 1280 /dev/pty/ttyp1
a5:/ 106 #
as you can see in the third line of output, the location of the command is /pro/bin/tcsh
[ BTW this is much more reliable than the find command, since commands can change the name they appear under in ps ]
Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2003 09:31 AM
03-26-2003 09:31 AM
Re: executable name in ps command
Hi JW,
ps is only going to show the command as it was entered - for EX
command
./command
/full/path/to/command
etc.....
So however the command was called is how ps will display it.
NOTE: that sometimes the actual command string is so long a "normal" ps -ef command output will truncate it. In that case use -x in the ps command - for EX:
ps -efx
You should get the entire command then. This is especially useful when you want to see all the command line parameters.
Rgds,
Jeff
ps is only going to show the command as it was entered - for EX
command
./command
/full/path/to/command
etc.....
So however the command was called is how ps will display it.
NOTE: that sometimes the actual command string is so long a "normal" ps -ef command output will truncate it. In that case use -x in the ps command - for EX:
ps -efx
You should get the entire command then. This is especially useful when you want to see all the command line parameters.
Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP