Visit Our UNIX and Linux User Community


Confused with few Commands


 
Thread Tools Search this Thread
Operating Systems Solaris Confused with few Commands
# 1  
Old 09-09-2009
Confused with few Commands

I have written a Shell which is been added to Crontab to execute few commands which Monitors my solaris boxes.
some commands aren't writing the logs(its Blank). but If I run directly it writes the log.
Ex: dfspace >> /unused1/Monitoring/Log/log_110.txt,

display message priority critical start '09/09 12:00:00' stop '09/10 11:59:59' all >> /unused1/Monitoring/Log/log_110.txt,

and have the same 10 boxes, am checking the same through shell script and transferring the log to a single Box with different file names
would like to this remotely on all the boxes at once every 3 hours.
Please help me with this
# 2  
Old 09-09-2009
as always please check out the FAQs first.
# 3  
Old 09-09-2009
Question Some things come to mind when comparing crontab to interactive runs

1) who is the user running the crontab
2) rights/access to program and/or to the file to be written
3) path settings

Have you looked into those issues?
# 4  
Old 09-09-2009
It's the user root on all the boxes.
as I explained, the Log written for the same sometimes when I directly run the Shell Directly, not always
# 5  
Old 09-09-2009
Quote:
Originally Posted by krishna2a
It's the user root on all the boxes.
as I explained, the Log written for the same sometimes when I directly run the Shell Directly, not always
thanks for sharing - follow the FAQ link provided above.
good luck.
# 6  
Old 09-14-2009
I found the answer,
When we need some commands to run automatically through crontab, we need to execute them from the executable location,
Ex: /vs/bin/logCat -t30 >> /unused1/Monitoring/Log/log_110.txt
and
/vs/bin/tools/dfspace >> /unused1/Monitoring/Log/log_110.txt
would execute and write the logs with out any issues

Previous Thread | Next Thread
Test Your Knowledge in Computers #233
Difficulty: Easy
The goal of ARPANET, the precursor to the global Internet, was to exploit new computer technologies to meet the needs of military command and control against nuclear threats, achieve survivable control of US nuclear forces, and improve military tactical and management decision making.
True or False?

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Confused with ' ' , " " ... used in commands

What happens to the shell when we include ' ' or "" in our commands ..And what happens if we use only the commands without single or double quotes. I don't know the use of these things. Can you please help me with simple example please ? using ls or grep -Thanks a lot (3 Replies)
Discussion started by: varun aravinth
3 Replies

2. AIX

Confused with ' ' , " " ... used in commands

What happens to the shell when we include ' ' or "" in our commands ..And what happens if we use only the commands without single or double quotes. I don't know the use of these things. Can you please help me with simple example please ? using ls or grep Thanks a lot (0 Replies)
Discussion started by: varun aravinth
0 Replies

3. Shell Programming and Scripting

Confused with if/then

Hi All, I'm pretty new to this so please bear with me... I'm trying to write a bash script to first search in a file for a string of characters; if the characters exist than skip the rest of the code until you get to the last line and run that command /sbdin/ldconfig; if the string doesn't... (2 Replies)
Discussion started by: gmdune
2 Replies

4. Ubuntu

New and Confused

Hello, I am having a problem with Dual Booting Windows XP Pro and Linux Mint. I have Three Hard Drives, One Hard Drive has Linux Mint Loaded on it. When it is hooked up to the computer by itself it works great. This is an IDE Drive. The Second Hard Drive has Window XP Pro loaded on it.... (3 Replies)
Discussion started by: Forextrading
3 Replies

5. Solaris

Confused c#t#d#s#

I am confused c#t#d#s# once I learn the following : slice 0 ...... 0 to 2520 slice 1....... 2521 to 2840 slice 6........2841 to 8891 slice 2........0 to 8891 really really confused. Please explain. (8 Replies)
Discussion started by: deltakutty
8 Replies

6. UNIX for Dummies Questions & Answers

confused

A red hat linux ftp server exists in which a file exists. My problem is I need to connect to this server from my windows xp terminal which is in the same network & retrieve the file then convert it to xcel for some data Pls advs commands and procedure to connect to the machine...oh my god... (1 Reply)
Discussion started by: sauravjung
1 Replies

7. Shell Programming and Scripting

confused with cp

may i know what cp $1 $2 $0 $2 does? (12 Replies)
Discussion started by: C|[anti-trust]
12 Replies

8. UNIX for Dummies Questions & Answers

confused

hi! how when i'm chattin inside com there was this chatter andi don't know what he did but he saw all my files inside my shell. what did he do? (4 Replies)
Discussion started by: hapiworm
4 Replies

9. UNIX for Dummies Questions & Answers

confused,,,,

Hi,,, is there any possibility to install Linux in my P.C which is use Win98 without loose anything from my hard disk???? ---------------------------------------------------------------------------------- Is it better for a newbie in this kind of OS to install Linux instead of... (5 Replies)
Discussion started by: spyros
5 Replies

Featured Tech Videos