Sponsored Content
Full Discussion: tracing processes in shell
Top Forums Shell Programming and Scripting tracing processes in shell Post 302293987 by otheus on Wednesday 4th of March 2009 08:19:03 AM
Old 03-04-2009
strace -p 10101 2>output.strace
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

different shell programs,processes

Hi, why do we have 3 types of shell programs. I read that the k-shell is supposed to be the latest replacement of the Bourne shell with additional features. But why call it K-shell when one can call it as a different version of Bourne shell say bourne2. what do we have the C shell for? Is... (1 Reply)
Discussion started by: ramyar
1 Replies

2. UNIX for Advanced & Expert Users

Spawing multiple display processes from one shell.

Question: Suppose I want to, from the terminal, use a shell script that would do the display image.jpg command to load multiple images from a directory all at the same time. One terminal, and for example 10 image files. Basically I want to execute 10 different commands simultaniously all from the... (4 Replies)
Discussion started by: JoeTheGuy
4 Replies

3. Shell Programming and Scripting

Shell script creating too many processes.

I have a shell script that I am running every 60 seconds, but it is creating this process to the point that it is causing the server to perfrom poorly. Below is my script, what can I change to prevent this? while true do java -classpath .....( all my classes here) >/dev/null 2>&1 ... (3 Replies)
Discussion started by: Miller_K
3 Replies

4. Programming

Background processes in a dummy shell...

Hey guys, I am writing a very simple dummy shell in C++ and I am having trouble getting a process to run in the background. First of all, the shell has to recognize when I input a "&" at the end of the command, then it has to stick it in the background of the shell. I understand that if I want... (6 Replies)
Discussion started by: icer
6 Replies

5. Solaris

Tracing a shell script!!!

Hi all, I would like to know how to trace a shell script.. I meant i used the set -x command and also tried, $ bash -xv <script name> but the problem is am a newbie and did not understand what those + and ++ meant at the beginning of each line...(once the execution of the script starts),... (1 Reply)
Discussion started by: wrapster
1 Replies

6. Shell Programming and Scripting

turn on shell tracing of a makefile

hey, within a shell script file I know how to turn on tracing using "-x" #!/bin/bash -x now I have a complicated makefile which contains lots of `command`, and i would like to trace these `command`, where shall i put the option "-x"? thanks! (1 Reply)
Discussion started by: patiobarbecue
1 Replies

7. Shell Programming and Scripting

shell script for getting pid of spawn processes from shell

Hi, I am new this forum. I request you peoples help in understanding and finding some solution to my problem. Here it goes: I need to perform this set of actions by writing a shell script. I need to read a config file for the bunch of processes to execute. I need to fecth the pid of... (4 Replies)
Discussion started by: sachin4sachi
4 Replies

8. UNIX for Dummies Questions & Answers

How to kill all processes except shell window?

Hi i was referring to an article given in following website. Basic shell scripting questions | TechInterviews I was surprise to know that i can kill all running processes by using kill o. However when i tried running the command nothing happened. How would i establish this task? my machine... (5 Replies)
Discussion started by: pinga123
5 Replies

9. Shell Programming and Scripting

Wait for one processes to complete in a shell script

Let's say I start process A.sh, then start process B.sh. I call both of them in my C.sh How can I make sure that B starts its execution only after A.sh finishes. I have to do this in loop.Execution time of A.sh may vary everytime. It is a parameterized script. (17 Replies)
Discussion started by: rafa_fed2
17 Replies

10. Shell Programming and Scripting

Help with shell script handling processes

Hello I have a file which has around 120 lines of commands. I am trying to write a shell script like which reads the 'command' file and executes line by line with some additional (common argument) with maximum 6 commands active at a time. Each of these commands when executed takes time... (5 Replies)
Discussion started by: JackyShane_36
5 Replies
STRACE-LOG-MERGE(1)					      General Commands Manual					       STRACE-LOG-MERGE(1)

NAME
strace-log-merge - merge strace -ff -tt output SYNOPSIS
strace-log-merge STRACE_LOG strace-log-merge --help DESCRIPTION
strace-log-merge merges the output of strace -ff -tt[t] command, prepending PID to each line and sorting the result using time stamp as a key. OPTIONS
--help Show program usage and exit. STRACE_LOG Output file name prefix of files produced by a strace -ff -tt[t] command. EXIT STATUS
0 Success Non-zero Error occurred: either no argument specified (in that case a usage is printed), or something went wrong during the processing of STRACE_LOG.* files. USAGE EXAMPLE
$ strace -o sleepy -ff -tt -e trace=execve,nanosleep sh -c 'sleep 0.1 & sleep 0.2 & sleep 0.3' $ strace-log-merge sleepy | fold -w 72 -s 13475 21:13:52.040837 execve("/bin/sh", ["sh", "-c", "sleep 0.1 & sleep 0.2 & sleep 0."...], 0x7ffde54b2450 /* 33 vars */) = 0 13478 21:13:52.044050 execve("/bin/sleep", ["sleep", "0.3"], 0x5631be4f87a8 /* 33 vars */) = 0 13476 21:13:52.044269 execve("/bin/sleep", ["sleep", "0.1"], 0x5631be4f87a8 /* 33 vars */) = 0 13477 21:13:52.044389 execve("/bin/sleep", ["sleep", "0.2"], 0x5631be4f87a8 /* 33 vars */) = 0 13478 21:13:52.046207 nanosleep({tv_sec=0, tv_nsec=300000000}, NULL) = 0 13476 21:13:52.046303 nanosleep({tv_sec=0, tv_nsec=100000000}, NULL) = 0 13477 21:13:52.046318 nanosleep({tv_sec=0, tv_nsec=200000000}, NULL) = 0 13476 21:13:52.146852 +++ exited with 0 +++ 13475 21:13:52.146942 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=13476, si_uid=1000, si_status=0, si_utime=0, si_stime=0} --- 13477 21:13:52.247782 +++ exited with 0 +++ 13475 21:13:52.247885 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=13477, si_uid=1000, si_status=0, si_utime=0, si_stime=0} --- 13478 21:13:52.347680 +++ exited with 0 +++ 13475 21:13:52.347786 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=13478, si_uid=1000, si_status=0, si_utime=0, si_stime=0} --- 13475 21:13:52.348069 +++ exited with 0 +++ NOTES
strace-log-merge does not work well with strace logs generated by strace -tt invocation that pass midnight, as those lack the information required for the proper sorting. Employing the -ttt option in the respective strace invocation should solve the problem. BUGS
strace-log-merge does not perform any checks whether the files specified are in the correct format and implies that only files from a sin- gle strace session match STRACE_LOG.* glob pattern. HISTORY
The initial version of strace-log-merge was written by Denys Vlasenko in 2012. REPORTING BUGS
Problems with strace-log-merge should be reported to the strace mailing list at <strace-devel@lists.sourceforge.net>. SEE ALSO
strace(1) strace UNKNOWN 2018-04-11 STRACE-LOG-MERGE(1)
All times are GMT -4. The time now is 06:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy