04-21-2006
How to get process name from process id in all Unix platforms?
Hi,
i need to find the process name using the process id in C. This has to be done in HP, AIX, Solaris & Linux??
How can this be done? Is there any common solution to all platforms?
On linux i have heard that /proc/<pid>/cmdline can be used. Is there a structure available to read this?
Please let me know.
Thanks,
molu
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
how to start a process and make it sleep for 5 mins and then kill that process (6 Replies)
Discussion started by: shrao
6 Replies
2. Shell Programming and Scripting
Hi Friends,
I am new to this forum as well as new to shell scripting.
I have a problem here and i need someone to solve this.
Let us consider there are two processes(abc & def).There is a script which kills these two processes(i.e killtheprocess abc). Here abc is the argument .
There is a... (1 Reply)
Discussion started by: Prince89
1 Replies
3. Shell Programming and Scripting
Hello all,
I would be happy if any one could help me with a shell script that would determine all the processes running on a Unix server and post a mail if any of the process is not running or aborted.
Thanks in advance
Regards,
pradeep kulkarni.
:mad: (13 Replies)
Discussion started by: pradeepmacha
13 Replies
4. Shell Programming and Scripting
Hi Experts, we do have a shell script for Unix Solaris, which will kill all the process manullay, it used to work in my previous env, but now it is throwing this error.. could some one please help me to resolve it
This is how we execute the script (and this is the requirement) ... (2 Replies)
Discussion started by: jonnyvic
2 Replies
5. Shell Programming and Scripting
get email notification from from system when a process from XXXX user takes longer than 15 min run.Let me know the time estimation for the same.
hi ,any one please tell me , how to write a script to get email notification from system when a process from as mentioned above a xxxx user takes... (1 Reply)
Discussion started by: kirankrishna3
1 Replies
6. BSD
Hi Experts,
I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state.
On doing cat /proc/<pid>wchan showing the "__init_begin" in the output.
Can you please help me here... (0 Replies)
Discussion started by: naveeng
0 Replies
7. UNIX for Advanced & Expert Users
Hi Experts,
I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state.
On doing cat /proc/<pid>wchan showing the "__init_begin" in the output.
Can you please help me here... (1 Reply)
Discussion started by: naveeng
1 Replies
8. UNIX for Advanced & Expert Users
Hi Experts,
I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state.
On doing cat /proc/<pid>wchan showing the "__init_begin" in the output.
Can you please help me here... (6 Replies)
Discussion started by: naveeng
6 Replies
9. Shell Programming and Scripting
I am writing a script to kick off a process to gather logs on multiple nodes in parallel using "&". These processes create individual log files. Which I would like to filter and convert in CSV format after they are complete. I am facing following issues:
1. Monitor all Processes parallelly.... (5 Replies)
Discussion started by: shunya
5 Replies
10. Shell Programming and Scripting
Team,
I have multiple batchjobs running in VM, if I do ps -ef |grep java or tomcat I am getting multiple process list.
How do I get my exact tomcat process running and that is unique? via shell script? (4 Replies)
Discussion started by: Ghanshyam Ratho
4 Replies
LEARN ABOUT FREEBSD
linprocfs
LINPROCFS(5) BSD File Formats Manual LINPROCFS(5)
NAME
linprocfs -- Linux process file system
SYNOPSIS
linproc /compat/linux/proc linprocfs rw 0 0
DESCRIPTION
The Linux process file system, or linprocfs, emulates a subset of Linux' process file system and is required for the complete operation of
some Linux binaries.
The linprocfs provides a two-level view of process space. At the highest level, processes themselves are named, according to their process
ids in decimal, with no leading zeros. There is also a special node called self which always refers to the process making the lookup
request.
Each node is a directory containing several files:
exe A reference to the vnode from which the process text was read. This can be used to gain access to the process' symbol table, or to
start another copy of the process.
mem The complete virtual memory image of the process. Only those addresses which exist in the process can be accessed. Reads and writes
to this file modify the process. Writes to the text segment remain private to the process.
Each node is owned by the process's user, and belongs to that user's primary group, except for the mem node, which belongs to the kmem group.
FILES
/compat/linux/proc The normal mount point for the linprocfs.
/compat/linux/proc/cpuinfo CPU vendor and model information in human-readable form.
/compat/linux/proc/meminfo System memory information in human-readable form.
/compat/linux/proc/pid A directory containing process information for process pid.
/compat/linux/proc/self A directory containing process information for the current process.
/compat/linux/proc/self/exe The executable image for the current process.
/compat/linux/proc/self/mem The complete virtual address space of the current process.
EXAMPLES
To mount a linprocfs file system on /compat/linux/proc:
mount -t linprocfs linproc /compat/linux/proc
SEE ALSO
mount(2), unmount(2), procfs(5), pseudofs(9)
HISTORY
The linprocfs first appeared in FreeBSD 4.0.
AUTHORS
The linprocfs was derived from procfs by Pierre Beyssac. This manual page was written by Dag-Erling Smorgrav, based on the procfs(5) manual
page by Garrett Wollman.
BSD
August 10, 1994 BSD