Sponsored Content
Top Forums Shell Programming and Scripting Unable to execute glance from cronjob Post 302839321 by Shravani on Thursday 1st of August 2013 05:01:09 AM
Old 08-01-2013
Unable to execute glance from cronjob

Hi
I am writing a script to get the CPU and memory utilization periodically from glance command.
Wrote a script which consists of below two lines
Script name : Utilization.sh

Code:
#!/bin/sh
glance -iterations 1 | sed -n '/Util/p/'| awk '!/Disk/'| awk '!/Swap/' >> file.txt

I am able to run the above manually from user home directory.But for some reason this script is not running when I schedule it in crontab.

I even tried executing glance from /opt/perf/bin/glance....did not work
I am using HP-UX 11i
Can some one help me on this?
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

exec unable to run via cronjob

Hi , I write a script like this\ and put it under / (root) : ref=88 df -k | grep /cbmdata/00/gdd | tr -d '%' | \ while read a b c d e other do if (( $e >= $ref )) then line=`find /cbmdata/00/gdd -name "LOGS*" |sort -nr |tail -1` # echo $line rm -f $line fi done ... (11 Replies)
Discussion started by: xramm
11 Replies

2. UNIX for Advanced & Expert Users

unable to execute a .SH file

this is (11 Replies)
Discussion started by: angelina
11 Replies

3. Shell Programming and Scripting

need to have a cronjob which will execute certain scripts every hr

Hi My question needs two answers how to write scripts to update a table in oracle db based on the result of the number of record counts for example i need to execute the following script every hour awk '{sum++;}END{for(i in sum) {print i, sum}}' filename here everyhour the... (3 Replies)
Discussion started by: aemunathan
3 Replies

4. Shell Programming and Scripting

Check a condition in cronjob to execute a sh file

Hi, I need to execute a crontab based on a condition where one SH file should be executed only based on the output of a file in a folder. I have written the following cron job which is not working. 00 01 * * * read a < /px/batch/reslut.txt && && sh /px/batch/check.sh where my... (2 Replies)
Discussion started by: shanth_chandra
2 Replies

5. UNIX for Dummies Questions & Answers

unable to execute while loop

Hi everyone. I wanted to print numbers from 1 to 5 in reverse order. For this I used the following code: #!/bin/bash x=5 while do echo $x x=`expr $x - 1` echo "" done echo "" Well but on compiling the above code, it gives the following error. ... (3 Replies)
Discussion started by: grc
3 Replies

6. Shell Programming and Scripting

How to execute cronjob running in a different machine?

Hi, I am developing 1 script in which I need to execute one cron job running in different server and my script is in different server. so can any one help me to execute the cronjob set in different server. Thanks in advance. (1 Reply)
Discussion started by: mridul10_crj
1 Replies

7. Shell Programming and Scripting

Execute Shell Script from CRONJOB

Hi Users, I am Newbie to linux and cron. I have a requirement to run a job at 8 AM every Sunday. I am using RHEL 5. Based on the hints through google search I created crontab and added entry to call the shell script which will in turn login to Oracle user and execute a pl/sql block. ... (1 Reply)
Discussion started by: reachravi70
1 Replies

8. Shell Programming and Scripting

expect telnet script execute by cronjob

hi, please help, keep getting this bolded error and look it up and people say its your environment variable though i tried to set it manually in expect..it run fine if i run it manually but once i run it by cronjob it error below..i tried to comment out ip/login info with *.. logfile:: START... (0 Replies)
Discussion started by: cssanangeles
0 Replies

9. Shell Programming and Scripting

Cronjob to be execute today at 9pm

HI Folks, Sorry for this basic confusion but please help me. i want to execute one script at 9pm today. i want make this as schedule so it can execute automatically. So am doing like this. 21 10 24 4 <here what can i keep) /tmp/stemp/testcron.ksh Can you please help on this? ... (6 Replies)
Discussion started by: coolboy98699
6 Replies

10. UNIX for Beginners Questions & Answers

Execute Ubuntu 14.04 cronjob as non-root

I have created a cronjob that successfully executes and among other thing runs aria2c to download several files and save them to a folder. However, since it executes as sudo, the downloaded folder is saved with those permissions. Is there a way to execute the cronjob so that the downloaded folder... (4 Replies)
Discussion started by: cmccabe
4 Replies
PERF-SCHED(1)							    perf Manual 						     PERF-SCHED(1)

NAME
perf-sched - Tool to trace/measure scheduler properties (latencies) SYNOPSIS
perf sched {record|latency|map|replay|script} DESCRIPTION
There are five variants of perf sched: 'perf sched record <command>' to record the scheduling events of an arbitrary workload. 'perf sched latency' to report the per task scheduling latencies and other scheduling properties of the workload. 'perf sched script' to see a detailed trace of the workload that was recorded (aliased to 'perf script' for now). 'perf sched replay' to simulate the workload that was recorded via perf sched record. (this is done by starting up mockup threads that mimic the workload based on the events in the trace. These threads can then replay the timings (CPU runtime and sleep patterns) of the workload as it occurred when it was recorded - and can repeat it a number of times, measuring its performance.) 'perf sched map' to print a textual context-switching outline of workload captured via perf sched record. Columns stand for individual CPUs, and the two-letter shortcuts stand for tasks that are running on a CPU. A '*' denotes the CPU that had the event, and a dot signals an idle CPU. OPTIONS
-i, --input=<file> Input file name. (default: perf.data unless stdin is a fifo) -v, --verbose Be more verbose. (show symbol address, etc) -D, --dump-raw-trace= Display verbose dump of the sched data. SEE ALSO
perf-record(1) perf 06/30/2014 PERF-SCHED(1)
All times are GMT -4. The time now is 09:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy