Sponsored Content
Full Discussion: Script for validation
Top Forums Shell Programming and Scripting Script for validation Post 302844431 by capitanui on Monday 19th of August 2013 08:37:33 AM
Old 08-19-2013
Your script should look something like this :

Code:
#!/bin/bash

#Get the number of processes containing etl running
VAR=`ps -ef | grep 'etl' | grep -v grep | wc -l`

#Verify if VAR >= 1
if [ $VAR -lt 1 ]; then
        echo "Problem -  No etl process running" | mail -s "No process Alert" email@address.com
fi

#END

This User Gave Thanks to capitanui For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help in file validation by shell script

Hi I am new to this forum.I need a help in the following: We receve pipe delimited file with transaction ID,tran_date,Quest_cd,Ans_cd,ans_value. Same transaction ID can be repeated with different quest_cd and ans_cd. Basically I need to check if a perticular pair of quest_cd and ans_cd... (1 Reply)
Discussion started by: srichakra
1 Replies

2. Shell Programming and Scripting

UNIX script Validation

Hi, I have a UNIX script which has two parts: 1. It connects to a database and refreshes a materialized view 2. It then connects to another database and inserts refresh statistics to a table The script works, but I'm not too good at UNIX validation. Currently, if the first part of the job... (1 Reply)
Discussion started by: matchey
1 Replies

3. Shell Programming and Scripting

ISQL connectivity validation in script

1. Is there a way to validate ISQL connectivity in shell script(ksh) before executing any queries..? 2.what is the best way to handle NULL from ISQL restult assigned to a script variable ?(if ISQL connectivity fails) rowCount=`/sybase/OCS-12_5/bin/isql -S $serverName -H $hostInfo -D $dbName -U... (2 Replies)
Discussion started by: vikram3.r
2 Replies

4. Shell Programming and Scripting

Validation in shell script.

PICKUPDIR=/home/ready/ DROPDIR=/home/downloaded/ TODAY=$(date '+%d%m%y') LOGFILE=xyz-$TODAY.log ########### #FUNCTIONS# ########### #function to perform file transfer to servercopy folder opalO () { cd $PICKUPDIR for fileName in `ls -1 TES_ONE*` do cp $fileName $DROPDIR done } >>... (4 Replies)
Discussion started by: ravigupta2u
4 Replies

5. Shell Programming and Scripting

Shell script validation using process.

Hi All, I have a shell script in Linux and it will be invoked by 2 methods, 1) An automated background process . 2) Logining into the box and directly executing the script. I need to put a validation in my shell script such that it will be executed successfully on when an... (11 Replies)
Discussion started by: vininx
11 Replies

6. Shell Programming and Scripting

String validation in shell script

Hi All, I am a newbie...I would like to have a function which ll check if a file contains valid strings before "=" operator. Just to give you my requirement: assume my file has content: hello= gsdgsd sfdsg sgdsg sgdgdg world= gggg hhhh iiiii xxxx= pppp ppppp pppp my... (1 Reply)
Discussion started by: rtagarra
1 Replies

7. Shell Programming and Scripting

Application Validation Script

Hi I am going to write a script in unix that shall include code to check status of server, dmgr,db connection .Can some one assist me in determining anything else needed to automate application status . (1 Reply)
Discussion started by: vinil
1 Replies

8. Shell Programming and Scripting

Script help on sudo access validation

hello I need help on this. The input is this. server system account name DBA account name x a p y b q z c r so i would like to check the sudo of the user is done or not. this is what i do to check it 1. login as root on server x 2.... (2 Replies)
Discussion started by: Kiran008
2 Replies

9. UNIX for Dummies Questions & Answers

Validation to be added in the shell script

I need help with one of my shell script. The script is working fine but i need to add two condition - i need to get rid of all the below ftp messages and need to have only ftp completed or failed message. example when i run the script i get below lines - Connected to xxxx 220 (vsFTPd... (1 Reply)
Discussion started by: chandraprakash
1 Replies

10. Shell Programming and Scripting

Help with validation of URLs in shell script

hello every one I wrote the script to validate all the urls from my server . sourcing text file which contains the list of urls and trying to check every url and based on response printing url is up or not. the issue when i use the below code with url is printing url exist and and in loop it's... (3 Replies)
Discussion started by: markjohn1
3 Replies
UPSLOG(8)						      Network UPS Tools (NUT)							 UPSLOG(8)

NAME
upslog - UPS status logger SYNOPSIS
upslog -h upslog ups logfile interval [format] DESCRIPTION
upslog is a daemon that will poll a UPS at periodic intervals, fetch the variables that interest you, format them, and write them to a file. The default format string includes variables that are supported by many common UPS models. See the description below to make your own. OPTIONS
-h Display the help message. ups Monitor this UPS. The format for this option is [upsname@]hostname[:port]. logfile Store the results in this file. You can use - for stdout, but upslog will remain in the foreground. interval Wait this many seconds between polls. Remember that a poll is not instantaneous, so it will slip back as the program runs. If you require tighter timing, you should write your own logger using the upsclient library. format The string to log, including variables from the UPS. Valid escapes within this string are: %% - insert a single % %TIME format% - insert the time with strftime formatting %ETIME% - insert the number of seconds, ala time_t. This is now a 10 digit number. %HOST% - insert the local hostname %UPSHOST% - insert the host of the UPS being monitored %PID% - insert the pid of upslog %VAR varname% - insert the value of variable varname The default format string is: %TIME @Y@m@d @H@M@S% %VAR battpct% %VAR utility% %VAR loadpct% [%VAR status%] %VAR upstemp% %VAR acfreq% SERVICE DELAYS
The interval value is merely the number given to sleep() after running through the format string. Therefore, a query will actually take slightly longer than the interval depending on the speed of your system. LOG ROTATION
upslog writes its pid to upslog.pid, and will reopen the log file if you send it a SIGHUP. This allows it to keep running when the log is rotated by an external program. SEE ALSO
Server: upsd(8) Clients: upsc(8), upscmd(8), upsrw(8), upsmon(8) Internet resources: The NUT (Network UPS Tools) home page: http://www.exploits.org/nut/ NUT mailing list archives and information: http://lists.exploits.org/ Wed Oct 16 2002 UPSLOG(8)
All times are GMT -4. The time now is 02:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy