Shell Programming and Scripting

BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

Need iplanet process health runtime details


👤 Login to reply

    #1  
Old 02-12-2018
mohtashims mohtashims is offline
Registered User
 
Join Date: Jun 2011
Last Activity: 20 July 2018, 2:29 PM EDT
Posts: 814
Thanks: 218
Thanked 7 Times in 7 Posts
Hammer & Screwdriver Need iplanet process health runtime details

Hi,

I have iPlanet 7.0 process running on Solaris system
SunOS mymac15.10 Generic_150400-59 sun4v sparc sun4v
.

The link here suggests to use the below command to get process runtime details / health inorder to understand if the iPlanet process is hung or good.

Code:
/usr/bin/ps -o "pid ppid cmd args" | grep webservd | grep -v admin-server

However, i do not have this ps version tool and my command fails with the below error:

Code:
ps: unknown output format: -o cmd

usage: ps [ -aAdeflcjLPyZ ] [ -o format ] [ -t termlist ]

        [ -u userlist ] [ -U userlist ] [ -G grouplist ]

        [ -p proclist ] [ -g pgrplist ] [ -s sidlist ] [ -z zonelist ]

  'format' is one or more of:

        user ruser group rgroup uid ruid gid rgid pid ppid pgid sid taskid ctid

        pri opri pcpu pmem vsz rss osz nice class time etime stime zone zoneid

        f s c lwp nlwp psr tty addr wchan fname comm args projid project pset

Can you please suggest what would be a good command which will help me collect all the process related etails so i know if the iPlanet process was hung or good ?
Sponsored Links
    #2  
Old 02-12-2018
vgersh99's Unix or Linux Image
vgersh99 vgersh99 is offline Forum Advisor  
Forum Advisor
 
Join Date: Feb 2005
Last Activity: 21 July 2018, 3:52 PM EDT
Location: Foxborough, MA
Posts: 8,314
Thanks: 260
Thanked 842 Times in 786 Posts
instead of cmd try comm(per man ps for SunOS 5)
Sponsored Links
    #3  
Old 02-13-2018
Don Cragun's Unix or Linux Image
Don Cragun Don Cragun is offline Forum Staff  
Administrator
 
Join Date: Jul 2012
Last Activity: 21 July 2018, 4:00 AM EDT
Location: San Jose, CA, USA
Posts: 11,411
Thanks: 651
Thanked 3,971 Times in 3,394 Posts
Try /usr/xpg4/bin/ps instead of /usr/bin/ps.
    #4  
Old 02-13-2018
mohtashims mohtashims is offline
Registered User
 
Join Date: Jun 2011
Last Activity: 20 July 2018, 2:29 PM EDT
Posts: 814
Thanks: 218
Thanked 7 Times in 7 Posts
Quote:
Originally Posted by vgersh99 View Post
instead of cmd try comm(per man ps for SunOS 5)
It does not seem to return the correct output or does it?
Code:
bash-3.2$ ps -o "pid ppid comm args" | grep webservd
 7291 23776 grep                                                            grep webservd

There are atleast 15 iplanet instances running. Why do I see one one entry in the output. Does not look right. Please let me know if it is.

---------- Post updated at 04:03 PM ---------- Previous update was at 04:02 PM ----------

Quote:
Originally Posted by Don Cragun View Post
Try /usr/xpg4/bin/ps instead of /usr/bin/ps.
No Luck

Code:
bash-3.2$ ls -ltr /usr/xpg4/bin/ps
/usr/xpg4/bin/ps: No such file or directory

Sponsored Links
    #5  
Old 02-13-2018
MadeInGermany MadeInGermany is offline Forum Staff  
Moderator
 
Join Date: May 2012
Last Activity: 21 July 2018, 12:48 PM EDT
Location: Simplicity
Posts: 4,156
Thanks: 365
Thanked 1,419 Times in 1,275 Posts
I think the Oracle page has some flaws.
Try
Code:
ps -eo "pid ppid comm" | grep webservd

This includes -e (search in all processes) and does not list the grep process itself (because it matches its own arguments in args).
Sponsored Links
👤 Login to reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need generic command to get complete running process details mohtashims Shell Programming and Scripting 8 04-04-2017 10:35 AM
Need to get process details Vishal_dba AIX 4 01-05-2014 12:26 AM
Process holding /tmp space, need to know the process details chidori Solaris 9 04-18-2013 02:31 AM
How to find the details of the previously running process with PID vijay.d UNIX for Dummies Questions & Answers 2 01-12-2009 03:04 PM
need help to write script to check the process health and automatically restart it dragondad Shell Programming and Scripting 1 10-31-2006 05:16 PM



All times are GMT -4. The time now is 04:55 PM.

Unix & Linux Forums Content Copyright©1993-2018. All Rights Reserved.
×
UNIX.COM Login
Username:
Password:  
Show Password





Not a Forum Member?
Forgot Password?