08-27-2015
Hello Don,
We only need to report in case of failures, if the process is running as expected then no need to report.
For all failures in servers list it should append to the file /var/tmp/failed.txt so that we can send out all in 1 email.
List of servers are different, so processes running on them differ. I can append wc -l at the end of script for string comparison if that can address the issue.
Due to large volume of servers its hard to manage/insert script on all servers, we need one host to check for errors and report through email on exact failure, so if new servers are added to list along with new processes then we can just edit/update script in 1 place rather than 1000+.
I will update the script to send email only incase of failures or /var/tmp/failed.txt is found.
Thanks,
Saikrishna
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am executing a find command in my script i.e
find $2 -type f -name '*.gif' -mtime +$1 -exec rm {} \;
how do i check that this command is executed properly.. i would lke t trap the errror and display my error message
kinly help.. this is an urgent issue. (1 Reply)
Discussion started by: vijay.amirthraj
1 Replies
2. Shell Programming and Scripting
Hi to everyone.
How can I get the exit status from a remote command executed with rexec? :eek:
machine A has RedHat Linux 9 and the remote machine B has SCO UNIX.
Code:
rexec -l user -p password host sh /u/files/scripts/seq_cal.sh 2006 08
I want the exit status returned by... (1 Reply)
Discussion started by: zoonalex
1 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
Can anyone tell/guide me how to check remote host is up/running using bash script?
Thanks.
Zulfiqar (5 Replies)
Discussion started by: zulfikarmd
5 Replies
4. Shell Programming and Scripting
Hi,
My script needs to check whether the remote host is up or not.
If it is up i need to start few servers in that host or else just a notification should be sent that the remote host is down?
Could someone help me out in this?
Regards
Arun (4 Replies)
Discussion started by: arunkumarmc
4 Replies
5. Solaris
Hi there
I am in the process of writing a script to check whether a port on a remote system is up or not.
Here's what I have so far:
#!/bin/bash
telnet xx.xx.xx.xx 80 | (echo "^]")
if ]; then
echo "Please check Web services " | mailx -s "Please check webservices... (1 Reply)
Discussion started by: notreallyhere
1 Replies
6. Shell Programming and Scripting
Hi all,
I'm trying to run the sipp simulator in crontab but after some attempt I came to the conclusion that for some reason this isn't possible (maybe due to sipp interactive nature).
This is confirmed by these posts.
Now I'm trying to launch sipp from an expect script that runs in crontab.
... (0 Replies)
Discussion started by: Evan
0 Replies
7. Solaris
Hello,
Is there any way to check which user and from which IP executed a command to the server.I need something like the history but with information also from which IP the command executed.
Thanks in advance (8 Replies)
Discussion started by: @dagio
8 Replies
8. Shell Programming and Scripting
Hi,
Given addresses of 2 remote machines, using a shell script is it possible to
get the state of running processes in "src"
stop all the processes in "src"
exit out of "src"
ssh into "dest"
resume the state of executing processes captured in step 1 in "dest"
Assumption:
"src" is... (3 Replies)
Discussion started by: Saeya Darsan
3 Replies
9. Shell Programming and Scripting
I have a script, which connecting to remote server and first checks, if the files are there by timestamp. If not I want the script exit without error. Below is a code
TARFILE=${NAME}.tar
TARGZFILE=${NAME}.tar.gz
ssh ${DESTSERVNAME} 'cd /export/home/iciprod/download/let/monthly;... (3 Replies)
Discussion started by: digioleg54
3 Replies
10. UNIX for Beginners Questions & Answers
Hi all, posting my first time, hope not breaking posting rules with it, if yes, let me know.
I'm trying to build a script to check a file in an sftp server through a remote server.
The intention is to check the file in a sftp host, and if the file is found or not, it should send an email.... (4 Replies)
Discussion started by: MrShinyPants
4 Replies
PYZOR(1) General Commands Manual PYZOR(1)
NAME
pyzor - spam-catcher using a collaborative filtering network
SYNOPSIS
pyzor [-d] [--homedir dir] command [command_options]
OPTIONS
-d turn on debugging
--homedir dir
use dir as the home directory for Pyzor instead of the default ~/.pyzor. See the files section for more information on what files
are inside of the homedir.
COMMANDS
check[--mbox]
Reads on standard input an RFC 822 (email) message. Exit code is zero (0) if and only if a match is found and the global whitelist
count is zero. If --mbox is provided, then the input is assumed to be a unix mailbox, and all messages in it will be checked. If
multiple servers are listed in the configuration file, the exit code will be zero (0) if and only if there is a match found on at
least one server (without it being whitelisted anyplace).
report [--mbox]
Reads on standard input an RFC 822 (email) message. Reports to the server a digest of each message in the mailbox as spam. Writes to
standard output a tuple of (error-code, message) from the server. If --mbox is provided, then the input is assumed to be a unix
mailbox, and all messages in it will be sent to the server.
whitelist [--mbox]
Reads on standard input an RFC 822 (email) message. Sends to the server a digest of each message in the mailbox for whitelisting.
Writes to standard output a tuple of (error-code, message) from the server. If --mbox is provided, then the input is assumed to be
a unix mailbox, and all messages in it will be sent to the server.
discover
Finds Pyzor servers, and writes them to ~/.pyzor/servers. This may accomplished through querying already-known servers or an HTTP
call to a hard-coded address.
ping Merely requests a response from the servers.
genkey Based upon a secret passphrase gathered from the user and salt gathered from /dev/random, prints to standard output a tuple of
"salt,key". Used to put account information into the accounts file. See the section Using Accounts for more information.
digest [--mbox]
Reads on standard input an RFC 822 (email) message. Writes the digest of the message to standard output. If --mbox is provided,
then the input is assumed to be a unix mailbox, each message's digest is written to standard output, separated by newlines.
predigest
Reads on standard input an RFC 822 (email) message. Writes to standard output the normalized lines of data that are digested, with
the exception that the lines printed have newlines (all whitespace is removed before digesting).
USING PYZOR WITH READYEXEC
ReadyExec is a system to eliminate the high startup-cost of executing scripts repeatedly. If you execute pyzor a lot, you might be inter-
ested in installing ReadyExec and using it with pyzor.
To use pyzor with ReadyExec, the readyexecd.py server needs to be started as:
readyexecd.py socket_file pyzor
socket_file can be any (non-existing) filename you wish ReadyExec to use, such as /tmp/pyzor:
readyexecd.py /tmp/pyzor pyzor
Individual clients are then executed as:
readyexec socket_file options command cmd_options
For example:
readyexec /tmp/pyzor check
readyexec /tmp/pyzor report
readyexec /tmp/pyzor whitelist --mbox
readyexec /tmp/pyzor -d ping
ReadyExec can be found at: http://readyexec.sourceforge.net/
INTEGRATION WITH MUTT
Add the following line to mutt.conf:
macro index S "|/usr/bin/pyzor report"
Then press S on the spam message in mutt to report it with pyzor.
FILES
~/.pyzor/config
The format of this file is INI-style (name=value, divided into [sections]). Names are case insensitive. All values which are filenames can
have shell-style tildes (~) in them. All values which are relative filenames are interpreted to be relative to the Pyzor homedir.
Defaults
[client]
ServersFile = servers
AccountsFile = accounts
DiscoverServersURL = http://pyzor.sourceforge.net/cgi-bin/inform-servers-0-3-x
Timeout = 5
SEE ALSO
pyzord(1)
AUTHOR
This manpage was originally written by Bastian Kleineidam <calvin@debian.org> for the Debian distribution of pyzor but may be used by oth-
ers. The main author of pyzor is Frank J. Tobin <ftobin@neverending.org>. The main project page for pyzor can be found at http://source-
forge.net/projects/pyzor
10 Oct 2002 PYZOR(1)