07-17-2013
Time command issuing all zeroes
I am trying to issue the time command on a program so I can see execution times but it is returning all zeroes. Like this:
time pdriver arg1 arg2
0.000u 0.000s 0:00.00 0.0% 0+0k 0+0io 0pf+0w
"0+0k 0+0io 0pf+0w" --> The "0+0io" may change sometimes to a different number.
How can I run the time command successfully? I'm using a unix terminal and my program is in c++.
Last edited by Don Cragun; 07-18-2013 at 01:14 AM..
Reason: Homework violation. New thread opened in proper forum.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a filename 'INITIATE_FINAL_ALL_000080889.dat', and I want to capture just the number '80889' from it.
Here is what I have so far:
%> echo INITIATE_FINAL_ALL_000080889.dat | sed "s/*//g"
000080889
Now, I just need to trim off the padded zeroes.
Thanks,
- CB (3 Replies)
Discussion started by: ChicagoBlues
3 Replies
2. UNIX for Dummies Questions & Answers
I wondered if someone could point out the differences between the time commmand and usr/bin/time and the accuracy one might have over another.
Also, is there a website or two a person could maybe link for me to describe the differences?
Thank you for your time. (2 Replies)
Discussion started by: icedrake
2 Replies
3. Shell Programming and Scripting
So, I can't figure out how to do a previous question with printf, so I'm taking a different approach. Suppose I have a set of numbers:
1200,135.000000,12.30100,3212.3200,1.759403,,1230,101.101010,100.000000
I want to remove all trailing zeroes after the decimal, and, if it ends up orphaned,... (8 Replies)
Discussion started by: treesloth
8 Replies
4. Shell Programming and Scripting
I have th following file
0000000011
0000000001
0000000231
0000000001
0000000022
noow when i run the following command
sed 's/^0+//g' file name
I receive the same output and the leading zeroes are not removed from the file . Please let me know how to achieve... (4 Replies)
Discussion started by: asalman.qazi
4 Replies
5. UNIX for Advanced & Expert Users
How can I run a here document on just one line? I ask, because I need to issue it from C++ as a system() or similar command and for security reasons I don't want to write out a shell script file from the program and run it.
For example, how could I write:
passwd test <<EOF
n3wp3ss... (3 Replies)
Discussion started by: BrandonShw
3 Replies
6. Shell Programming and Scripting
I have the following script that renames filenames like:
blah_bleh_91_2011-09-26_00.05.43AM.xls
and transforms it in:
91_20110926_000543_3_blih.xls
for a in *.xls;
do
b="$(echo "${a}" | cut -d '_' -f4)"
dia=`echo ${b} | cut -c9-10`
mes=`echo ${b} | cut -c6-7`
anio=`echo ${b} | cut -c1-4`... (4 Replies)
Discussion started by: Tr0cken
4 Replies
7. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
A common problem arising in games and simulations is to generate a random arrangements of integers from 1 to N.... (5 Replies)
Discussion started by: lamentofking
5 Replies
8. Shell Programming and Scripting
Greetings all,
On a RedHat System - I am issuing a command from script.sh that will add a file extension to a listing of files in a directory. It works, but I need to script from having an extension added as well.
Here is what I have tried to no luck:
for file in `ls * | awk ' /\./{print... (6 Replies)
Discussion started by: jeffs42885
6 Replies
9. UNIX for Dummies Questions & Answers
Hi,
Using ksh, I have set up aliases (which work fine) in my user's .profile like this:
alias ll = 'ls -lrt'
alias cls = 'clear'
How do I call these same aliases so that they will work after issuing this: ? su - user
I do not want to add aliases to the su shell's .profile or .kshrc. (7 Replies)
Discussion started by: ocbit
7 Replies
LEARN ABOUT DEBIAN
opal-restart
OPAL-RESTART(1) Open MPI OPAL-RESTART(1)
NAME
opal-restart - Restart a previously checkpointed sequential process using the Open PAL Checkpoint/Restart Service (CRS)
Note: This should only be used by the user if the application being restarted is an OPAL-only application. If it is an Open RTE or Open MPI
program their respective tools should be used.
SYNOPSIS
opal-restart [ options ] <SNAPSHOT HANDLE>
Options
opal-restart will attempt to restart a previously checkpointed squential process from the snapshot handle reference returned by opal_check-
point.
<SNAPSHOT HANDLE>
The snapshot handle reference returned by opal_checkpoint, used to restart the process. This is required to be the last argument
to this command.
-h | --help
Display help for this command
--fork Fork off a new process, which is the restarted process. By default, the restarted process will replace opal-restart process.
-w | --where
The location of the local snapshot reference.
-s | --self
Restart this process using the self CRS component. This component is a special case, all other CRS components are automatically
detected.
-v | --verbose
Enable verbose output for debugging.
-gmca | --gmca <key> <value>
Pass global MCA parameters that are applicable to all contexts. <key> is the parameter name; <value> is the parameter value.
-mca | --mca <key> <value>
Send arguments to various MCA modules.
DESCRIPTION
opal-restart can be invoked multiple, non-overlapping times. This allows the user to restart a previously running sequential process. See
opal_crs(7) for more information about the CRS framework and components.
When using the self CRS component, the <FILENAME> argument is replaced by the name of the program to be restarted followed by any arguments
that need to be passed to the program. For example, if under normal execution we would start our program "foo" as:
shell$ setenv OMPI_MCA_crs=self
shell$ setenv OMPI_MCA_crs_self_prefix=my_callback_prefix
shell$ ./foo arg1 arg2
To restart this process, we may only need to call:
shell$ opal-restart --self
-mca crs_self_prefix my_callback_prefix
./foo arg1 arg2
This will cause the "my_callback_prefix-restart" function to be called as soon as the program "foo" calls OPAL_INIT. You do not have to
call your program with the same argument set as before. There for we could have just as correctly called:
shell$ opal-restart --self
-mca crs_self_prefix my_callback_prefix
./foo arg3
This depends upon the behavior of the program "foo".
SEE ALSO
opal-checkpoint(1), opal_crs(7)
1.4.5 Feb 10, 2012 OPAL-RESTART(1)