1820317 Members
2487 Online
109623 Solutions
New Discussion юеВ

tusc for time

 
SOLVED
Go to solution
Paula J Frazer-Campbell
Honored Contributor

tusc for time

Hi to all Fron Sunny London.

I need script help please.

I am monitoring possible process loops and wish to put the captured pid into a 5 second tusc run - outputting the results to a file.

Basically

Get iffy pid

run tusc (for 5 seconds) > /piffypid.txt.

Thanks in advance

Paula
If you can spell SysAdmin then you is one - anon
4 REPLIES 4
John Palmer
Honored Contributor

Re: tusc for time

Hi Paula,

Something like:-

Get iffy pid

tusc $iffy_pid >somefile &
sleep 5

kill ${!}


Regards,
John
Paula J Frazer-Campbell
Honored Contributor

Re: tusc for time

John

Thanks,

I do not wish to kill the iffy pid but you gave me an idea to pick up the pid of tusc and kill that after 5 seconds.

Thanks

Paula
If you can spell SysAdmin then you is one - anon
John Palmer
Honored Contributor
Solution

Re: tusc for time

Paula,

${!} will be the PID of the tusc process.

Regards,
John
Paula J Frazer-Campbell
Honored Contributor

Re: tusc for time

Thanks John

Paula
If you can spell SysAdmin then you is one - anon