06-12-2008
Every time you execute a pipe you create a child process. This is expensive and consumes huge amounts of resource.
You can get past this by doing things like creating co-processes, or setting up cooperating processes. Again we need to see the "seven" pipes to sed. Which is very likely the bottleneck - but that is a guess.
10 More Discussions You Might Find Interesting
1. AIX
How to allocate memory for a shell script on aix box at the time of execution i.e at runtime
Are there any commands for AIX in specific
Thanks in Advance (1 Reply)
Discussion started by: aixjadoo
1 Replies
2. UNIX for Dummies Questions & Answers
How to allocate memory for a shell script on aix box at the time of execution i.e at runtime
Are there any commands for AIX in specific
Thanks in Advance (3 Replies)
Discussion started by: aixjadoo
3 Replies
3. UNIX for Advanced & Expert Users
How to allocate memory for a shell script on aix box at the time of execution i.e at runtime
Are there any commands for AIX in specific
Thanks in Advance (1 Reply)
Discussion started by: aixjadoo
1 Replies
4. UNIX for Advanced & Expert Users
Hi
I have an xml file which has multiple xml records..
I don't know how to read those records and pipe them to another shell command
the file is like
<abc>z<def>y<ghi>x........</ghi></def></abc> (1st record)
<jkl>z<mno>y<pqr>x........</pqr></mno></jkl> (2nd record)
Each record end... (4 Replies)
Discussion started by: aixjadoo
4 Replies
5. Shell Programming and Scripting
I have to fix files with only one huge line. Basically this line contains huge number of records may be in thousands of fix length. Suppose if we consider the length of one record as 100 bytes and if we have 50 such record. Then the file will have only one line with 100*50 bytes.
I want to... (3 Replies)
Discussion started by: hrvispute
3 Replies
6. UNIX for Advanced & Expert Users
Hi unix Gurus,
I am really new to Unix Scripting. Please help me to create a shell script which reads the xml file and from that i need to fetch a particular information.
For example
<SOURCE BUSINESSNAME ="" DATABASETYPE ="Teradata" DBDNAME ="DWPROD3" DESCRIPTION ="" NAME... (2 Replies)
Discussion started by: SmilePlease
2 Replies
7. Shell Programming and Scripting
Hi unix Gurus,
I am really new to Unix Scripting. Please help me to create a shell script which reads the xml file and from that i need to fetch a particular information.
For example
<SOURCE BUSINESSNAME ="" DATABASETYPE ="Teradata" DBDNAME ="DWPROD3" DESCRIPTION ="" NAME... (5 Replies)
Discussion started by: SmilePlease
5 Replies
8. Red Hat
Hey , can we read an xml file and make changes in it through shell script.
Thanks (4 Replies)
Discussion started by: ramsavi
4 Replies
9. Shell Programming and Scripting
<Start>
<Header>
This is header section
</Header>
<Body>
<Body_start>
This is body section
<a>
<b>
<c>
<st>111</st>
</c>
<d>
<st>blank</st>
</d>
</b>
</a>
</Body_start>
<Body_section>
This is body section (3 Replies)
Discussion started by: RJG
3 Replies
10. UNIX for Beginners Questions & Answers
Hello All,
I am new to unix scripting. I need to read FROMINSTANCE, FROMFIELD from below XML code and need to write a script for
insert into SQ_EPIC values( "DID", "PROJECT_NAME")
Select DID, PROJECT_NAME from EPIC<CONNECTOR TOINSTANCETYPE="Source Qualifier" TOINSTANCE="SQ_EPIC" TOFIELD="DID"... (7 Replies)
Discussion started by: sekhar.lsb
7 Replies
times(2) System Calls Manual times(2)
NAME
times - get process and child process times
SYNOPSIS
DESCRIPTION
fills the structure pointed to by buffer with time-accounting information. The structure defined in is as follows:
struct tms {
clock_t tms_utime; /* user time */
clock_t tms_stime; /* system time */"
clock_t tms_cutime; /* user time, children */
clock_t tms_cstime; /* system time, children */
};
This information comes from the calling process and each of its terminated child processes for which it has executed a or The times are in
units of 1/seconds, where is processor dependent. The value of can be queried using the function (see sysconf(2)).
is the CPU time used while executing instructions in the user space of the calling process.
is the CPU time used by the system on behalf of the calling process.
is the sum of the and of the child processes.
is the sum of the and of the child processes.
RETURN VALUE
Upon successful completion, returns the elapsed real time, in units of 1/of a second, since an arbitrary point in the past (such as system
start-up time). This point does not change from one invocation of to another. If fails, (clock_t) -1 is returned and is set to indicate
the error.
Remarks
has a granularity of one tick. Processes which run less than one tick may not register any value.
ERRORS
fails if buffer points to an illegal address. The reliable detection of this error is implementation dependent.
WARNINGS
Not all CPU time expended by system processes on behalf of a user process is counted in the system CPU time for that process.
SEE ALSO
time(1), exec(2), fork(2), gettimeofday(2), sysconf(2), time(2), wait(2).
STANDARDS CONFORMANCE
times(2)