03-08-2011
log monitoring continously and executing commands
Hi
I want a script which continously searches for a work "MAX xonnections reached" in log file . As soon as it sees the message it needs to do series of steps
1) execute netstat command and redirect output to a file in /tmp
2) again continue monitoring the log file .
this job should run until we kill the process of script
plesae suggest asap.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a SQL script that requires values from the environment in order to execute. I found a way to get the desired results but my process is a little choppy. Any suggestions on how to clean this up would be greatly appreciated.
SQL Script
-------------
select a, b, c
from d
where a =... (1 Reply)
Discussion started by: bmopal
1 Replies
2. UNIX for Dummies Questions & Answers
I have written a script to ftp a file from Unix to an NT machine to authenticate ftp login I have added the information into the .netrc file when logged in using ftp the commands are not executed. Does anybody know how to make the command execute once username and password have been provided using... (2 Replies)
Discussion started by: hesmas
2 Replies
3. UNIX for Dummies Questions & Answers
Hi, guys !
I have at home a simple network. I have a server that shares the internet connection to my computer and another another computer which is located in another room. When I want to download something, I'd like to download directly on the server, without letting my computer on. The server... (2 Replies)
Discussion started by: Sergiu-IT
2 Replies
4. Shell Programming and Scripting
Hi Guys.
I am a complete shell scripting newbie with some syntax and commands understanding. I'm more of a win admin. With that said: I need to write a shell script to monitor a directory '/Mon_Dir' for new occurrences of files with .xx extension. Once a new file is detected in the directory, a... (4 Replies)
Discussion started by: krkan
4 Replies
5. Shell Programming and Scripting
Hello All,
I want to make a script which continously checks one folder all the time that is there is any file in it or not, and if it found any file in it than execute that file with the following command.
apxrcv -text < filename > outputfile
Actually my requirement is that i will put... (4 Replies)
Discussion started by: wakhan
4 Replies
6. Red Hat
Hi Folks,
I have a small doubt, the binary commands under /bin and /sbin as well as other path binary files, if you peek deep into that, you can find the difference in the way of normal perl programming and some commands will be like binary files. how are the commands executing like the... (3 Replies)
Discussion started by: gsiva
3 Replies
7. Shell Programming and Scripting
Hi,
I want to run these two commands one after the other.
awk 'BEGIN {OFS="\t"} {print $2}'
sort -u
rather than typing awk 'BEGIN {OFS="\t"} {print $2}' file1 > file2, then sort -u file2 > file3. Is it possible to run both commands on file1 then get output file3?
Its kinda hard for... (5 Replies)
Discussion started by: kylle345
5 Replies
8. Shell Programming and Scripting
I need to execute a command to run my script several times with varying parameters
perl ex.pl -b 130198 -e 130884 -c plot plot.txt 1_plot.txt
perl ex.pl -b 1345 -e 1308 -c plot plot.txt 2_plot.txt
perl ex.pl -b 1345567 -e 130898 -c plot plot.txt 3_plot.txt
.
.
.
100's of excutions
... (2 Replies)
Discussion started by: Lucky Ali
2 Replies
9. Shell Programming and Scripting
Hello.
I am new in shell script. Could anyone help me?
I have un shell script. I need each command in it be sequentielly, when the first command ends the second starts. When the second ends et third starts, and so on
Thanks in adavance (1 Reply)
Discussion started by: nurinolo
1 Replies
10. Shell Programming and Scripting
If you want to capture the output of any command, we then will be writing the system command in `` or qx.
`` an qx works fine with all linux and windows system commands.
But when I execute the below code.. it is displaying the output on the screen directly instead of storing to variable
... (3 Replies)
Discussion started by: giridhar276
3 Replies
LEARN ABOUT HPUX
cmscancl
cmscancl(1m) cmscancl(1m)
NAME
cmscancl - gather system configuration information from nodes with Serviceguard installed.
SYNOPSIS
cmscancl [-n node_name]... [-s|-o output_file]
DESCRIPTION
cmscancl is a configuration report and diagnostic tool intended only for use by HP Support Personnel. It gathers system software and hard-
ware configuration information from a list of nodes, or from all the nodes in a cluster. The information that this command displays
includes LAN device configuration, network status and interfaces, file systems, LVM configuration, link-level connectivity (HPUX only),
IPv4/IPv6 connectivity, and the data from the binary cluster configuration file. This command can be used as a troubleshooting tool or as
a data collection tool.
This command is a Perl script which gathers system configuration information by executing various OS commands or tools. It uses the cmexec
command to gather information from remote nodes.
The -n option can be used to specify a list of nodes to be scanned, the nodes to be scanned do not need to be a member of a cluster. If
the -n option is not specified, it will scan all the nodes in the local cluster.
By default, the output of this command will go to the file /tmp/scancl.out. If the file /tmp/scancl.out already exists, the old file will
be saved in /tmp/scancl.out.old.
The -o option can be used to redirect output to a specified output file. If the -o option is not specified, output will go to the default
output file /tmp/scancl.out.
The -s option can be used to direct all output to the screen, instead of to an output file.
Options
cmscancl supports the following options:
-n node_name... Specify the node(s) to be scanned. If this option is not specified and there is a cluster configured, all the
nodes in the cluster will be scanned. If this option is not specified and there is no cluster configured, only the
local node will be scanned.
-o output_file Write configuration information to a specified output file. If this option is not specified, the information will
be directed to stdout.
-s Display the configuration information to the screen only. This option cannot be used in conjunction with the -o
option.
The output from this command contains the following information:
LAN device configuration (On HP-UX, output from lanscan; On Linux, output from ifconfig)
network status and interfaces (output from netstat)
file systems (output from mount)
LVM configuration (contents of /etc/lvmtab file)
LVM physical vg information (contents of /etc/lvmpvg file)
link-level connectivity (HP-UX only)
(output from linkloop)
IPv4/IPv6 connectivity (results from ping (and ping6 on Linux))
binary configuration file data
(output from cmviewconf)
RETURN VALUE
cmscancl returns the following value:
0 Successful completion.
1 Command failed.
EXAMPLES
To gather the configuration information from node1 and node2 and to save the output in file /tmp/scancl.log:
cmscancl -n node1 -n node2 -o /tmp/myscancl.log
To gather the configuration information from all the nodes in the cluster and save the output to the file: /tmp/scancl.log:
cmscancl -o /tmp/myscancl.log
To gather the configuration information from all the nodes in the cluster and display the output on the screen:
cmscancl -s
To gather the configuration information from all the nodes in the cluster and save the output to the file /tmp/scancl.out:
cmscancl
AUTHOR
cmscancl was developed by HP.
SEE ALSO
Linux:
cmviewcl(1), mount(8), netstat(8), ping(8), ping6(8)
HP-UX:
cmviewcl(1m), lanscan(1m), linkloop(1m), mount(1m), netstat(1), ping(1m)
Requires Optional Serviceguard Software cmscancl(1m)