can anyone tell me how to Create ten processes and display useful information about them including PID, starting-time in unix using c or c++ language. i tried to create 10 different processes using fork and exec but i couldn't display those process info:PID,STIME.
my sample code
......
......
pid = fork();
if(pid == 0)
{
execl("/bin/ls", "ls");
}
elseif(pid == -1)
{
/error handling
}
else
{
execl("/bin/ps", ""ps);
}
.......
........
parent process execute 'ps' command
child process execute 'ls' command
the script should display pid and stime of those processes:'ps' and 'ls'. like this i want to create 10 processes and display info.please give me ur suggestions to develope a code myself.
I am programming some data loader of oracle with unix c, when I find new data file, then read it to database and delete it. but one issue, if the file is in process of creating, not been closed yet. I will read zero or part of data content, this will cause problem. I want to know whether some unix... (2 Replies)
i want to create 3 child processes from the same parent using folk. I know how to use folk but my child processes did not come from the same parent. Any suggestion what i did wrong ? (12 Replies)
Hell Sir,
This is chanikya
Is there any System call which behaves just like fork but i dont want to return back two times to the calling func.
In the following ex iam creating a child process in the called func but the ex prints two times IN MAIN.
ex :-
calling()
{
fork();
}
... (2 Replies)
sorry im very new to this but i am supposed to create 3 processes A,B, and C and have a direct link from a to b, b to c, and c to a.
here is my code. It does work, however if you look at what I bolded as long as my final read is p it seems to always work, regardless of the bolded section.
... (6 Replies)
I actually posted this problem on a different forum, but figured this would be a more appropriate place to post it.
OK so I've created my own shell, but I can't get the background process function to run properly! What I want to do is to run a process in the background, and also print when the... (2 Replies)
hi
i need shell script in ksh for the automation process in informtica.
The automation process is like this .
i have a folder in unix . when this folder gets updated (like if a file or files is/are added to the folder) an event in informatica is triggered and after the process is done in... (2 Replies)
Hi,
I am trying to create a shell script to automate the following process of getting svn stats:-
Step1:- cd to checkout location.
Note that the checked code have multiple modules in respective folders
Step2:- Execute this command inside each module:-
svn log -v --xml >... (0 Replies)
Hi,
I have a unix script that basically has a while loop inside which it checks Oracle database for certain records. If it finds the records, it does some processing and then goes back to the while loop. If it doesnot find any matching records, then it sleeps for 30 seconds and then goes back to... (17 Replies)
Hello Team,
In a application filesystem, there is a process keep creating the log files. Due to that the filesystem keep getting full. Please let me know how to identify the process which is keep writing in the filesystem.
fuser -u <FS> will show only the user who using the filesystem.... (3 Replies)
Discussion started by: gowthamakanthan
3 Replies
LEARN ABOUT X11R4
pmap
PMAP(1) User Commands PMAP(1)NAME
pmap - report memory map of a process
SYNOPSIS
pmap [options] pid [...]
DESCRIPTION
The pmap command reports the memory map of a process or processes.
OPTIONS -x, --extended
Show the extended format.
-d, --device
Show the device format.
-q, --quiet
Do not display some header or footer lines.
-A, --range low,high
Limit results to the given range to low and high address range. Notice that the low and high arguments are single string separated
with comma.
-X Show even more details than the -x option. WARNING: format changes according to /proc/PID/smaps
-XX Show everything the kernel provides
-p, --show-path
Show full path to files in the mapping column
-c, --read-rc
Read the default configuration
-C, --read-rc-from file
Read the configuration from file
-n, --create-rc
Create new default configuration
-N, --create-rc-to file
Create new configuration to file
-h, --help
Display help text and exit.
-V, --version
Display version information and exit.
EXIT STATUS
0 Success.
1 Failure.
42 Did not find all processes asked for.
SEE ALSO ps(1), pgrep(1)STANDARDS
No standards apply, but pmap looks an awful lot like a SunOS command.
REPORTING BUGS
Please send bug reports to <procps@freelists.org>
procps-ng September 2012 PMAP(1)