- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Retrieving the full command name with "ps" com...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО01-13-2004 06:42 AM
тАО01-13-2004 06:42 AM
Retrieving the full command name with "ps" command
I want to know whether particular perl script is running or not on HP-UX10.20 system. If use
ps -ef | grep -v "grep" | <script name> it is displaying nothing eventhough the script is running. If use wild character "*" in the script name it is displaying the output but I found that the script name is getting truncated at the end. I think there would be limitation in displaying the command name.If the command name is too big then it will truncate the command name.
In HP-UX11.11 I found the "-x" option in ps command which displays the full command name.
Can any body help me out the for the similar option in HPUX10.20 like "-x".
Thanks
Sekhar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-13-2004 06:45 AM
тАО01-13-2004 06:45 AM
Re: Retrieving the full command name with "ps" command
There may be a gnu version of ps you could try, but I am not certain and I don't know if that would even help you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-13-2004 06:20 PM
тАО01-13-2004 06:20 PM
Re: Retrieving the full command name with "ps" command
Could be very useful.
Maybe somebody at Tech Development Labs is reading this thread? ;->
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-13-2004 06:43 PM
тАО01-13-2004 06:43 PM
Re: Retrieving the full command name with "ps" command
In 10.20 you can use ps -f to display full command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-13-2004 06:48 PM
тАО01-13-2004 06:48 PM
Re: Retrieving the full command name with "ps" command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-13-2004 07:04 PM
тАО01-13-2004 07:04 PM
Re: Retrieving the full command name with "ps" command
'Only a subset of the command line is saved by the kernel'
Since ps takes its data from the kernel, you'll only see a subset.
Thus, if you want the complete command line, it won't work. But if you're only interested in the command name, try using the -l option instead of the -f option. Or use the XPG4 version (set the UNIX95 environment variable before running ps) and use the '-o comm' option.
Perhaps there is someone out there who knows a kernel parameter to extent the kernel command buffer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2004 12:19 PM
тАО01-14-2004 12:19 PM
Re: Retrieving the full command name with "ps" command
on less you are sending output to a script.
ps -ef | grep -v "grep" | <script name>
should be
ps -ef |grep -v "grep" |grep <script name>
Unfortunatly I don't know of 10.2 or 11.0 way
to get extended command line.
if you are executing the script via full path name. you might cd to the directory and then
execute your script
Rory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2004 03:54 PM
тАО01-14-2004 03:54 PM
Re: Retrieving the full command name with "ps" command
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2004 04:40 PM
тАО01-14-2004 04:40 PM
Re: Retrieving the full command name with "ps" command
Do u have that patch ID on the tip of your tongue, perhaps?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-17-2004 01:47 PM
тАО01-17-2004 01:47 PM
Re: Retrieving the full command name with "ps" command
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-18-2004 12:15 AM
тАО01-18-2004 12:15 AM
Re: Retrieving the full command name with "ps" command
have a look at the ps man page for UNIX95 options. For example: export UNIX95=1;ps -A -o comm=
It will show the command in a different way. Maybe this may help.
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-18-2004 11:09 AM
тАО01-18-2004 11:09 AM
Re: Retrieving the full command name with "ps" command
# UNIX95=1 ps -eo vsz,ruser,pid,args |sort -rn |more
# UNIX95=1 ps -eo vsz,ruser,pid,comm |sort -rn |more
-- or
# UNIX95=1 ps -eo vsz,ruser,pid,ppid,args |sort -rn |more
cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-18-2004 01:03 PM
тАО01-18-2004 01:03 PM
Re: Retrieving the full command name with "ps" command
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2004 12:20 PM
тАО01-19-2004 12:20 PM
Re: Retrieving the full command name with "ps" command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-19-2004 05:00 PM
тАО01-19-2004 05:00 PM