12-08-2008
AFAIK there's no standardized interface for getting that information as it is platform-specific. AIX uses the /proc filesystem while HPUX uses the pstat() system call interface.
10 More Discussions You Might Find Interesting
1. AIX
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
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. UNIX for Advanced & Expert Users
Hi all,
How can I get the list of all the processes that are either Orphan or Zombie or Running or Ended or Stopped ?
Please suggest !!
Thanks.
Varun:b: (2 Replies)
Discussion started by: varungupta
2 Replies
4. UNIX for Advanced & Expert Users
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
5. Shell Programming and Scripting
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
6. Shell Programming and Scripting
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
7. UNIX for Dummies Questions & Answers
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
8. Shell Programming and Scripting
Hi,
I've searched the related threads both in this forum and others in google and found the solution to be working too in most of the places. But somehow it's not working for me.
$cmd | tee -a $LOGFILE &
pid=$!
wait ${pid}
ret=$?
echo "$ret"
I want the exit status of the $cmd.... (8 Replies)
Discussion started by: ashwini.engr07
8 Replies
9. UNIX for Dummies Questions & Answers
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
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
SYSFS(2) Linux Programmer's Manual SYSFS(2)
NAME
sysfs - get filesystem type information
SYNOPSIS
int sysfs(int option, const char *fsname);
int sysfs(int option, unsigned int fs_index, char *buf);
int sysfs(int option);
DESCRIPTION
Note: if you are looking for information about the sysfs filesystem that is normally mounted at /sys, see sysfs(5).
The (obsolete) sysfs() system call returns information about the filesystem types currently present in the kernel. The specific form of
the sysfs() call and the information returned depends on the option in effect:
1 Translate the filesystem identifier string fsname into a filesystem type index.
2 Translate the filesystem type index fs_index into a null-terminated filesystem identifier string. This string will be written to the
buffer pointed to by buf. Make sure that buf has enough space to accept the string.
3 Return the total number of filesystem types currently present in the kernel.
The numbering of the filesystem type indexes begins with zero.
RETURN VALUE
On success, sysfs() returns the filesystem index for option 1, zero for option 2, and the number of currently configured filesystems for
option 3. On error, -1 is returned, and errno is set appropriately.
ERRORS
EFAULT Either fsname or buf is outside your accessible address space.
EINVAL fsname is not a valid filesystem type identifier; fs_index is out-of-bounds; option is invalid.
CONFORMING TO
SVr4.
NOTES
This System-V derived system call is obsolete; don't use it. On systems with /proc, the same information can be obtained via
/proc/filesystems; use that interface instead.
BUGS
There is no libc or glibc support. There is no way to guess how large buf should be.
COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the
latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
Linux 2017-09-15 SYSFS(2)