01-08-2013
Shell output with plot a tree structure.
Hi All,
i am in need of plotting graph ( tree structure ) depends upon my shell script output.
For this requirement, what kind of open source avail in market.
For example: (my script output will be like below )
Parent:A
process-name:child-processes
A:B,C
B: D
expecting tree like below (sample)
A
B C
D
please help me on this , which tool can i use for this ?
thanks in advance
PONMUTHU M
![Thumbsup Smilie](https://www.unix.com/images/smilies/thumb.gif)
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i cant get around using regular expressions in if/else statements. it simply doesnt give me the right results.
i've tried using switch/case but that is just as sh!tty as well. (pardon my french but im getting frustrated with c shell..only reason why im writing in it is because it's a hwk... (3 Replies)
Discussion started by: ballazrus
3 Replies
2. Shell Programming and Scripting
Hello,
I have a file of the following information ( first field parent item, second field child item)
PM01 PM02
PM01 PM1A
PM02 PM03
PM03 PM04
PM03 PM05
PM03 PM06
PM05 PM10
PM1A PM2A
PM2A PM3B
PM2A PM3C
The output should be like this :
PM01 PM02 PM03 PM04
... (2 Replies)
Discussion started by: ThobiasVakayil
2 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I want to list all the last directories from mentioned base path.
for eg: If i have a base path say /base/base1/
How can i get the path till last node in tree like directory structure of unix by applying any command.
so that i will get following output.
... (7 Replies)
Discussion started by: Shiv@jad
7 Replies
4. HP-UX
how could I use shell script to determine which CPU structure
because I found that I compile my program under Itanium base that cannot run on the PA-RISC base
but PA-RISC program can run on Itanium base
i would like to use shell script to know which CPU structure it is,how could i do
thanks (1 Reply)
Discussion started by: alert0919
1 Replies
5. UNIX for Dummies Questions & Answers
I have a list of software funtions in tcl code. Some of these functions call other functions. I want to build a tree structure of all called functions.
Right now I list all the functions into a file then read this file so that I can cat each function and grep for EXECUTE (command that calls... (0 Replies)
Discussion started by: MissI
0 Replies
6. UNIX for Dummies Questions & Answers
I am creating a hierarchical tree structure and I was wondering what commands I needed to do that. I have 4 directories and sixteen sub directories and 4 files. Thank you for your help in getting my started in right direction.:confused: (1 Reply)
Discussion started by: GreginNC
1 Replies
7. Shell Programming and Scripting
Hi Experts,
I have table in mysql like below:
'user` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`parent_id`
varchar(100) NOT NULL,
`member_name` varchar(100) NOT NULL,
`city` varchar(100) NOT NULL,
`member_id` varchar(100) NOT
NULL,
`password` varchar(100) NOT... (1 Reply)
Discussion started by: naw_deepak
1 Replies
8. Shell Programming and Scripting
Can we create the master file that show the whole tree structure of the directory till a particular folder?
Database that contains four sub repository Sybase,sql,oracle,mysql and sql and oracle contains two subrepostories Siebel and plsql and each repositories contains three folders... (1 Reply)
Discussion started by: rohit22hamirpur
1 Replies
9. Shell Programming and Scripting
Hi all,
I'm trying at the moment to write a shell script to build a directory tree and create files within the built directories. I've scoured through sites and text books and I just can't figure out how to go about it.
I would assume that I need to use loops of some sort, but I can't seem... (8 Replies)
Discussion started by: Libertad
8 Replies
10. Shell Programming and Scripting
Hi all,
I`m trying to generate some plots using a python package named splicegrapher.
I have access to a cluster which does not allow X11 forwarding and as a result I get RuntimeError: could not open display error when I use one of the plotting scripts (attached).
How do I modify the script... (1 Reply)
Discussion started by: newbie83
1 Replies
sample(1) BSD General Commands Manual sample(1)
NAME
sample -- Profile a process during a time interval
SYNOPSIS
sample pid | partial-executable-name [duration [samplingInterval]] [-wait] [-mayDie] [-fullPaths] [-e] [-file filename]
DESCRIPTION
sample is a command-line tool for gathering data about the running behavior of a process. It suspends the process at specified intervals (by
default, every 1 millisecond), records the call stacks of all threads in the process at that time, then resumes the process. The analysis
done by sample is called ``sampling'' because it only checks the state of the program at the sampling points. The analysis may miss execu-
tion of some functions that are not executing during one of the samples, but sample still provides useful data about commonly executing func-
tions.
At the end of the sampling duration, sample produces a report showing which functions were executing during the sampling. The data is con-
densed into a call tree, showing the functions seen on the stack and how they were called. (This tree is a subset of the actual call tree
for the execution, since some functions may not have been executing during any of the sampling events.) The tree is displayed textually,
with called functions indented one level to the right of the callee.
In the call tree, if a function calls more than one function then a vertical line is printed to visually connect those separate children
functions, making it easier to see which functions are at the same level. The characters used to draw those lines, such as + | : ! are arbi-
trary and have no specific meaning.
ARGUMENTS
The user of sample specifies a target process (either by process id, or by name), the duration of the sampling run (in seconds), and a sam-
pling rate (in milliseconds).
If the sampling duration is not specified, a default of 10 seconds is used. Longer sampling durations provide better data by collecting more
samples, but could also be confusing if the target process performs many different types of operations during that period.
The default sampling rate is 1 millisecond. Fast sampling rates provide more samples and a better chance to capture all the functions that
are executing.
-wait tells sample to wait for the process specified (usually as a partial name or hint) to exist, then start sampling that process. This
option allows you to sample from an application's launch.
-mayDie tells sample to immediately grab the location of symbols from the application, on the assumption that the application may exit or
crash at any point during the sampling. This ensures that sample can give information about the call stacks even if the process no longer
exists.
-fullPaths tells sample to show the full path to the source code (rather than just the file name) for any symbol in a binary image for which
debug information is available. The full path was the path to the source code when the binary image was built.
-e tells sample to open the output in TextEdit automatically when sampling completes.
-file filename tells sample the full path to where the output should be written. If this flag is not specified, results are written to a
file in /tmp called <application name>_<date>_<time>.<XXXX>.sample.txt, where each 'X' is replaced by a random alphanumeric character.
If neither the -e nor -file flags are given, the output gets written to stdout as well as saved to the file in /tmp.
SEE ALSO
filtercalltree(1), spindump(8)
The Xcode developer tools also include Instruments, a graphical application that can give information similar to that provided by sample. The
Time Profiler instrument graphically displays dynamic, real-time CPU sampling information.
BSD
Mar. 16, 2013 BSD