Measure thread execution (in C, unix)


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Measure thread execution (in C, unix)
# 8  
Old 03-24-2011
crontab running a .pl script

Hi
I have this posted in the Solaris section also so apologies if not permitted to post here also.

problem is that my cron will not run a script that runs perfectly fine from command line. The script is written in sh but contains reference to a .pl.

Initial script only had path #!/usr/bin/sh and does refer to a .pl script.
I have amedned now to have two paths with

#!/usr/bin/sh [At the start as normal]

&

#!/usr/bin/perl -w [before perl script is run]

This had no affect and the cron still does not run the script....

ANy help greatly appreciated
# 9  
Old 03-24-2011
Well, let's see:
  1. #! line first with good path and one arg max.,
  2. chmod,
  3. supporting environment from .profile or the like,
  4. cron running,
  5. cronab allowed to your id.
# 10  
Old 03-24-2011
sorry but your message doesn't make much sense.

The script runs from command so its not a permissions. I have several scripts already running fine in cron.
# 11  
Old 03-24-2011
Did you put a second line in each script, echoing out a debug message to a fixed path, so you can tell if cron runs either, say:
Code:
date "+%Y-%m-%d %H:%M:%S ($$) Start $0 ($#) $@" >>/tmp/croncheck.log

This User Gave Thanks to DGPickett For This Post:
# 12  
Old 03-24-2011
no I dint but I will do now, run and get back to you..thanks.

Does syntax change for each line?

($$) Start S0 ($#) $@" >> /<filename>
# 13  
Old 03-24-2011
Also check for core and email, and in the crontab line, maybe redirect to outer log
Code:
:5 4 3 2 1 (...) >>/var/tmp/cronlog.myid 2>&1

# 14  
Old 03-24-2011
Here is my script

Code:
#!/usr/bin/sh

cd /home/it/capopt/APNRD/S30
files=`gdate -d today  +%-d_%-m_%Y`
newfiles=`gdate -d today  +%-d%m`
cat *"$files"* > robtest
sleep 20
#!/usr/bin/perl -w
cd /home/it/capopt/APNRD/S30
./hash.pl robtest > $newfiles
#kill $
exit 0

---------- Post updated at 09:36 AM ---------- Previous update was at 09:35 AM ----------

thanks I have also removed the redirects from cron

Code:
16 4 * * * /home/it/capopt/APNRD/S30/condenseS30.sh


Last edited by Franklin52; 03-25-2011 at 04:00 AM.. Reason: Please use code tags
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Python Thread Execution Issue . . .

Greetings! I set up a basic threading specimen which does the job:#!/usr/bin/python import threading class a(threading.Thread): def __init__(self): threading.Thread.__init__(self) def run(self): print("thread a finished") class b(threading.Thread): ... (0 Replies)
Discussion started by: LinQ
0 Replies

2. Solaris

How to measure IOPS?

Hi I have a system running solaris 10, and I intend to use a NetApp as its storage system. The application requires a throughput between the server and the storage 7000 disk IOPS (random IO sustained throughput with response time of 20 mili second and 16k block size). How to make sure that I... (6 Replies)
Discussion started by: fretagi
6 Replies

3. AIX

How to measure waiting time in run queue?

Hello guys, I am doing a performance analysis on one of our psystem. Most of time I am using Nmon analyser to do my trend graph. But I can't find any help with it. We are interesting in the time spend by tasks in Aix run queue. After looking the Aix documentation, I am pessimist to find any... (3 Replies)
Discussion started by: GiiGii
3 Replies

4. UNIX for Advanced & Expert Users

Implementing thread in UNIX

Hi For our load testing , we are using stubs (unix shell script) which send the response to the request coming from the application. As the unix stub is single threaded , it is responding to only one request whereas multiple requests come in parallely. I haven't worked on thread concepts... (5 Replies)
Discussion started by: jenanee
5 Replies

5. Solaris

What exactly does 'zpool iostat' measure?

hi there, i'd like to know what exactly zpool's iostat (-v) output measure, especially the writes. Is it only the writes to the ZIL or all writes (including commmits) to the disks? if anyone knows, that'd be helpful roti (1 Reply)
Discussion started by: rotunda
1 Replies

6. UNIX for Advanced & Expert Users

How to measure g++ performance?

I am working on an application with some rather interesting build performance issues. If we build on Solaris/Linux x86/AMD64 the build is rather fast, but it takes more than five times as long on our Solaris Sparc servers (single-threaded builds on the workstations, but multi-threaded on the... (5 Replies)
Discussion started by: Elric of Grans
5 Replies

7. Shell Programming and Scripting

Is there a command to measure compile speed?

Hello Ive written 2 programs in shell and I need to compare their speed (Compile) against one another. what methods could I go about doing this? Is there a feature in shell do accommodate this? (2 Replies)
Discussion started by: Darklight
2 Replies

8. Forum Support Area for Unregistered Users & Account Problems

How to post a new thread (Regarding Unix related doubts) in Unix Forums

How to post a new thread (Regarding Unix related doubts) in Unix Forums. I registered my id but I am unable to post my Questions to Forum. Thanks & Regards, indusri (1 Reply)
Discussion started by: indusri
1 Replies

9. UNIX for Dummies Questions & Answers

CPU load unit of measure?

If unix says my cpu load is 2.15 exactly what does that mean? --Jason (1 Reply)
Discussion started by: Mac J
1 Replies
Login or Register to Ask a Question