LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-23-2006, 03:47 PM   #1
dipenchaudhary
Member
 
Registered: Jan 2006
Location: india
Distribution: FEDORA CORE 3
Posts: 103

Rep: Reputation: 15
retrieving execution time for process


hii
how can i know wots the time taken by a process for completely executing .. suppose i have a process i wanna find its time of execution .. i tried to work around /proc file system but it maintains stuff abt processes in process table alone .. so when a process has exited the system .. how can i trap it .. that how much time it stayed in process table ?
i was able to find out time slices recieved and all .. also able to find wots the memory occupied .. but unable to find wots the time of execution for one process .. coz /proc only maintains record of processes in table

any idea ..
and yehh one more thing .. is it possible to do network programming in shell ? i think maybe in c shell ? dont know ... i wanna send the info collected from my system abt processes and meminfo and loadbalance ... to another system acroos network .. is it possible via shell programming ??

and yehh if i eventually use perl .. can i usee it like shell .. i mena can i use commands like to read from proc directly ?

thanks please reply .. urgent
 
Old 02-23-2006, 03:52 PM   #2
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100
Try:
time ls /
 
Old 02-23-2006, 09:52 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
OR, for more info:
\time ls
calls a GNU extended version, more output.

You can use various progs from shell to move files eg:
scp/sftp
nfs
samba (will also work linux->linux)
or you can do it in Perl either using an above protocol or direct tcp/ip.
 
Old 02-24-2006, 10:27 AM   #4
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100
I never heard about \ just before a command! Can you tell more about it please?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
command execution time minil Programming 10 08-20-2010 04:59 PM
How do I Set MySQL Max Query Execution Time? farmerjoe Linux - General 1 01-26-2005 01:12 PM
how to [time] the execution hq4ever Linux - General 8 07-03-2004 04:57 AM
how get a process run time henryluo Linux - Newbie 9 06-10-2004 10:45 PM
Time of a process? AquamaN Programming 1 09-22-2003 02:46 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration