- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Truncated ps
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
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
тАО09-15-2003 01:05 AM
тАО09-15-2003 01:05 AM
To verify if processes are running I use the ps command redirected in a file (ps -exf > file). After some false positives I discovered that sometimes the output of the ps command was truncated after a process without name (see example below).
Have somebody any idea to explain that?
root 2936 1 0 Sep 1 ? 0:25 /usr/sbin/stm/uut/bin/tools/monitor/dm_stape
root 3009 1 0 Sep 1 ? 2:44 /usr/sbin/stm/uut/bin/tools/monitor/lpmc_em
root 2989 1362 0 Sep 1 ? 0:58 /opt/perf/bin/agdbserver -t alarmgen /var/opt/perf/datafiles/
root 14226 14195 1 19:35:56 ? 0:00
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2003 01:09 AM
тАО09-15-2003 01:09 AM
Re: Truncated ps
eg. /opt/perf/bin/agdbserver -t alarmgen /var/opt/perf/datafiles
is the complete command this process was started with - nothing is missing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2003 01:54 AM
тАО09-15-2003 01:54 AM
Re: Truncated ps
It is actually possible for applications to change their "process title" as it appears in the "args" field of ps -ef output by using an undocumented option to the pstat() system call. Sendmail and Oracle do this all the time so you can see what the processes are up to.
In your case you've got a program that looks like is setting its process title to an empty string. It *could* also be a small bug in the program thats not calling the exec() system call properly. Try the following:
* Check what the processes parent is (pid 14195). Something is spawning these "unnamed" processes and hopefully it has a name.
* Run ps without the -f argument (ie just ps -e). That will give you the basename of the command running instead of its full command line arguments.
* Use lsof to find out the full path to the program that is running. This is the line marked with "txt" as the fd.
That should tell you what the process is and you can go from there.
Regards,
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2003 02:13 AM
тАО09-15-2003 02:13 AM
Re: Truncated ps
/usr/include/sys/pstat.h:
#define PST_CLEN 64
If you are running 11.0
load this patch
http://www1.itrc.hp.com/service/patch/patchDetail.do?patchid=PHCO_26274&context=hpux:800:11:00
If you are running 11i
just use the -x option
#ps -efx
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-15-2003 08:08 AM
тАО09-15-2003 08:08 AM
Re: Truncated ps
ps -exf > file1 & ps -ef > file2
As the problem happens randomly I have waited a while and when it happened file1 was incomplete and file 2 was complete. The process corresponding to the last one of file1 was 'cp'.
May it be possible that ps has a bug with the -x option ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-16-2003 12:00 PM
тАО09-16-2003 12:00 PM
Re: Truncated ps
My guess is the output of ps is truncated b/c your output is to long or is not being full captured by > file1...
I would try:
ps -exf |grep
I will bet you will see the full ps listed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-16-2003 10:11 PM
тАО09-16-2003 10:11 PM
Re: Truncated ps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-19-2003 08:05 AM
тАО09-19-2003 08:05 AM
Re: Truncated ps
By only grepping out what processes you are interested in, you will ensure that will not happen and probably prevent the truncation of your output.
:)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-19-2003 01:55 PM