How to estimate a UNIX process ...


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to estimate a UNIX process ...
# 1  
Old 04-23-2008
Question How to estimate a UNIX process ...

Hi,

Does anybody knows how to estimate the duration of a certain process in UNIX?

I'm using Sun solaris system and I'm trying to extract some information from a binary file, but most of the time, the size of this binary file is quite huge hence it'll be great if I would be able to know and estimate how long does it take to perform the extraction process. So ... I don't have to wait in front of my monitor all day. Smilie

For example:
extract file123

Any help or advice would be greatly appreciated. Thanks.
# 2  
Old 04-23-2008
Computer scientist answer: it's impossible; this is isomorphic with the halting problem.

Practitioner's answer: if it took ten minutes to process 1%, you can do the math. Or if it took three hours yesterday and two and a half hours on the day before, that's useful data, too. Ballpark figures anyway. Depends on system load and the phase of the moon.
# 3  
Old 04-23-2008
put time in front of the command, e.g.
time gzip -dc file.tar.gz
then you'll be presented with the time that the respective command has taken for execution.
# 4  
Old 04-23-2008
Hi, thanks a lot for your quick response.

I thought it'll good if there is a script or a way to estimate this particular process in UNIX. Sorry, I'm not very good at math, so please help me a bit on this portion.

For example, if I start the extraction process at 9am and perhaps based on the filesize or other factors, is there a better way to estimate the duration of this extraction process?

Thanks.
# 5  
Old 04-23-2008
Without numbers or access to the program, we can't tell you too much. Do you know how long it takes to do 1kb? How about 2kb? Does it grow linearly with the size of the input, or is the curve different? What about memory footprint? (Google for "big-oh" if this is unfamiliar territory.) The actual math is uninteresting, but of course, once you understand the concepts and have some basic metrics to use for the calculations, it's a quick multiplication or two to get a real-world estimate in minutes or hours.

For example, I'm working on a program which needs to compare each input to all collected previous inputs. As the number of previous inputs grows, the running time will grow by one unit for each run. That's linear growth.

Now, I have a different program which needs to reorder all the inputs it remembers. So when a new input comes in, all the inputs need to be recompared against each other, in order to put them in the new correct order. That one doubles its running time each time a new input comes in, because the number of comparisons required doubles.

The O(n) mumbo-jumbo is just a convenient way to talk about these things, it takes about half an hour to get it at first but it's time well spent.

Last edited by era; 04-23-2008 at 10:24 AM.. Reason: Examples, and a link to wikibooks
# 6  
Old 04-23-2008
Hi, thank you for your response. Will try to take a look at the recommended O(n) mumbo-jumbo stuff. Hopefully will be able to extract something useful.

Thanks. Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

unix process

I have to create a parent process that receives n arguments, arg1, arg2 ... argn. The parent creates n son processes. Each one of these will read a text file argi and will print the pair of lines from the file in reversed order. Can anyone help me with this problem, please? (3 Replies)
Discussion started by: oana06
3 Replies

2. AIX

How to estimate time of mksysb & savevg ?

Hi All, I need to plan a downtime and need know how much time is required to take mksysb & rootvg on LTO4. Following are vg informations... # lsvg -l rootvg rootvg: LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT hd5 boot 1 2 2 closed/syncd N/A hd6 paging 64 128 2 open/syncd N/A hd8... (1 Reply)
Discussion started by: sraj142
1 Replies

3. UNIX for Dummies Questions & Answers

Unix Process

Hi , i scheduled jobs in crontab with dependency. some child process id killed without manual intervention or script . please add you thoughts how process id killed automatically. (1 Reply)
Discussion started by: challamsomu
1 Replies

4. Red Hat

Unix Process

Hi, I'm running weblogic 11g on Linux platform. My requirement is to have weblogic instances running and it is controlled by Nodemanager. In the sense, when ever the weblogic instance goes down, Node manager should start it. The set up requires to have weblogic running as user X, and... (2 Replies)
Discussion started by: aprasad
2 Replies

5. AIX

sysback - estimate backup size only?

Is there a flag to send to sysback on the command line so it will return the estimated backup size and exit? We're having issues with running to a second tape at a remote data center, and I want to alter the script to exit or add exclusions if the backup is over a certain size. The other... (0 Replies)
Discussion started by: tommysalami
0 Replies

6. Shell Programming and Scripting

Shell Script to Kill Process(number of process) Unix/Solaris

Hi Experts, we do have a shell script for Unix Solaris, which will kill all the process manullay, it used to work in my previous env, but now it is throwing this error.. could some one please help me to resolve it This is how we execute the script (and this is the requirement) ... (2 Replies)
Discussion started by: jonnyvic
2 Replies

7. Filesystems, Disks and Memory

Estimate Transfer Time

Hi, Not sure whether this is the relevant place for such question, but I hope can get some feedback on my question. I have 2 Sun machine. Basically I want to move some data from one box to another box using dedicated fiber connection. I would like to estimate the time required for the... (1 Reply)
Discussion started by: user50210
1 Replies

8. UNIX for Dummies Questions & Answers

Unix Process

Hi does unix keep track of the processes or programs it ran. can i check when my program last ran on the system. any suggestions are welocme. -- logs made by the program it self are missing. Regards Debadatta (4 Replies)
Discussion started by: mishra.dd
4 Replies

9. Programming

How to get process name from process id in all Unix platforms?

Hi, i need to find the process name using the process id in C. This has to be done in HP, AIX, Solaris & Linux?? How can this be done? Is there any common solution to all platforms? On linux i have heard that /proc/<pid>/cmdline can be used. Is there a structure available to read this? ... (3 Replies)
Discussion started by: molu
3 Replies

10. Programming

Unix Process

I have successfully opened /dev/table/proc file and read processes pids and its details from it, but I am unable to have programatic knowledge of how to access process CMD or its corresponding name. Kindly do guide me out on the said request for which I will be very thankfull. (3 Replies)
Discussion started by: S.P.Prasad
3 Replies
Login or Register to Ask a Question