Sponsored Content
Top Forums UNIX for Advanced & Expert Users List Process with their Status. Post 302177532 by jim mcnamara on Friday 21st of March 2008 11:14:20 AM
Old 03-21-2008
ps will give you the status as sleeping or running or zombie
Orhpans = either zombies or daemons. daemons show owner=root and parent pid = 1
Ended process means looking into accounting files like wtmp, bmtp, or utmp for process entries with ut_type=USER_PROCESS (in C code).
 

10 More Discussions You Might Find Interesting

1. AIX

Process status display

On AIX 5.2, I use "ps -ef " command to display the process status, the field of command looks like: , the detailed contents are: # ps -ef |grep rtesfmrt Display: osa 32455 1 0 18:20 - 1:57 The origianl format shoud be: osa 32455 1 0 18:20 - 1:57 ... (2 Replies)
Discussion started by: Frank2004
2 Replies

2. UNIX for Advanced & Expert Users

Getting status of a signal in process?

Hi all, How can a process be aware of the signals it handles. I looked at available signal API, but couldn't find any help. If a process defines it own handler for a signal, the default handler for that signal becomes overridden. I am interested in getting to know the... (2 Replies)
Discussion started by: bluehive
2 Replies

3. Programming

process status

hello everybody!! i want to post a question! is there any way to get process status using C commands? To be more specific, i want to know whether a process is running or is stop or killed. thanks in advance! (3 Replies)
Discussion started by: nicos
3 Replies

4. Shell Programming and Scripting

Printing the Status of a Process in an Instance

Hi, I am executing the command: "./opmnctl status" to get the status of the processes in the instance. There are totally 5 processes that are avaialble, out of which 3 are "Alive" and 2 are "Down". How can I use the IF loop to get the status and echo it?? For instance I want to run a check... (8 Replies)
Discussion started by: yoursdavinder
8 Replies

5. UNIX for Advanced & Expert Users

Status of a Linux process

All, I have fair amount of knowledge about shell scripting, but only liitle on system administration. I would like to know how to analyze whether the particular linux process is alive or not ? If it is alive, will it affect the performace of other process ?. Also is it still consuming... (1 Reply)
Discussion started by: apsprabhu
1 Replies

6. Shell Programming and Scripting

How to Check the process Status and do something

Hi we have weblogic deployed under Linux Enterprise 5 . Now i want to write a script that checks if weblogic is running or not I have found that weblogic uses Java as process . Can i do this way : my Script File : Echo Checking Status if then echo Server Running else echo... (2 Replies)
Discussion started by: Ravi Pavanv
2 Replies

7. Shell Programming and Scripting

How to check the process status

Hi, I have a cron job which runs every ten minutes, now i hav to check the process whether it is running or not only once and then this should be sent to a log file.. crontab : 00,10,20,30,40,50 * * * * a process check ps = 'ps -ef |grep a ' if then echo " Success" >... (3 Replies)
Discussion started by: NehaKrish
3 Replies

8. UNIX for Dummies Questions & Answers

Process status for NOHUP command

Hi, I have run a shell script as a background process using 'nohup' command. I want to see the process id of this, so that I will be able to kill it later on when required. I tried to collect these details using 'ps' command and could not view this information. How do we get this... (5 Replies)
Discussion started by: Dev_Dev
5 Replies

9. UNIX for Dummies Questions & Answers

How can I learn the status of a process

how can I learn the status of a process (sleeping, running or ready.) (2 Replies)
Discussion started by: merturk
2 Replies

10. UNIX for Beginners Questions & Answers

Check status of process

Hi All, Have a query How to check for a process and if down start it , try if for 2 times and its not starting don't do it My code is working to some extent but while starting try starting both times. Please advise , whats wrong here ? if you have any other approach please do share. My... (1 Reply)
Discussion started by: abhaydas
1 Replies
utmp(4) 						     Kernel Interfaces Manual							   utmp(4)

NAME
utmp, wtmp, btmp - user login record format SYNOPSIS
DESCRIPTION
These files, which hold user and accounting information for such commands as and (see last(1), who(1), write(1), and login(1)), have the following structure as defined by #define UTMP_FILE "/etc/utmp" #define WTMP_FILE "/var/adm/wtmp" #define BTMP_FILE "/var/adm/btmp" #define ut_name ut_user struct utmp { char ut_user[8]; /* User login name */ char ut_id[4]; /* /etc/inittab id(usually line#)*/ char ut_line[12] /* device name (console, lnxx) */ pid_t ut_pid; /* process id */ short ut_type; /* type of entry */ struct exit_status short e_termination; /* Process termination status*/ short e_exit; /* Process exit status*/ } ut_exit; /* The exit status of a process*/ /* marked as DEAD_PROCESS.*/ unsigned short ut_reserved1; /* Reserved for future use*/ time_t ut_time; /* time entry was made*/ char ut_host[16]; /* host name,if remote*/ unsigned long ut_addr; /* host Internet addr, if remote*/ }; /* Definitions for ut_type */ #define EMPTY 0 #define RUN_LVL 1 #define BOOT_TIME 2 #define OLD_TIME 3 #define NEW_TIME 4 #define INIT_PROCESS 5 /* Process spawned by "init" */ #define LOGIN_PROCESS 6 /* getty process awaiting login */ #define USER_PROCESS 7 /* A user process */ #define DEAD_PROCESS 8 #define ACCOUNTING 9 #define UTMAXTYPE ACCOUNTING /* Max. legal value of ut_type */ /* Special strings or formats used in the "ut_line" field */ /* when accounting for something other than a process */ /* No string for the ut_line field can be more than */ /* 11 chars + a NULL in length */ #define RUNLVL_MSG "run-level %c" #define BOOT_MSG "system boot" #define OTIME_MSG "old time" #define NTIME_MSG "new time" File contains a record of all users logged onto the system. File contains bad login entries for each invalid logon attempt. File contains a record of all logins and logouts. Note that and tend to grow without bound, and should be checked regularly. Information that is no longer useful should be removed periodi- cally to prevent it from becoming too large. Also note that and are not created by the programs that maintain them. Thus, if these files are removed, record-keeping is turned off. FILES
AUTHOR
and were developed by HP and the University of California, Berkeley. SEE ALSO
last(1), login(1), who(1), write(1), acctcon(1M), fwtmp(1M), utmpd(1M), getut(3C), getuts(3C), getutx(3C). STANDARDS CONFORMANCE
TO BE OBSOLETED utmp(4)
All times are GMT -4. The time now is 01:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy