10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to multiply column1 and column3 data and need to compare it with column5. Need to check multiplication and Throw error if result is greater or less than column5 values, though difference of +/- 2 will be ok
Ex - if column1 has 2.4 and column3 has 3.5, it will be ok if column5 have value... (13 Replies)
Discussion started by: as7951
13 Replies
2. Shell Programming and Scripting
Hi ,
I tried the below code to remove the files older that 30 days .
#!/bin/ksh
set -x
file_path1="/home/etc"
file_path2="/home/hst"
file_nm="HST"
days=30
find $file_path1/*$file_nm* -type f -mtime +$days -exec rm -f {} \;
find $file_path2/*$file_nm* -type f -mtime +$days -exec rm... (3 Replies)
Discussion started by: smile689
3 Replies
3. Shell Programming and Scripting
Hi,
We have a shell script which looks into a directroy for any folder older than 30 days and removes them. The command being used is
find $ARCHIVE_DIR -type d -mtime +$PURGE_HIST_DAYS -exec rm -rf {} \;
It removes some folders but then throw below errors for others:
find:... (2 Replies)
Discussion started by: DejaVu
2 Replies
4. Shell Programming and Scripting
Hi folks,
I am trying a small script to delete a files from multiple servers having a common pattern.
I use this code
for i in `seq -w 25 100`
do
echo "************host server-name*********"
ssh -p 22022 server-name 'echo `hostname` && find /var/log -name "test*" ... (5 Replies)
Discussion started by: gauravsharma29
5 Replies
5. Shell Programming and Scripting
Hi,
I have a requirement like i have to search a script and find names that conatins more than two dots, if so then throw error.
For ex: a1.b1.comname here i have to find comname and check two dots. it will not throw error
a1.b1.c1.comname here it contains more than 2dots it will throw... (3 Replies)
Discussion started by: swagat123
3 Replies
6. UNIX for Advanced & Expert Users
Executing "find /abc -follow -ls" the message "find: cycle detected for /abc/def/ghi/
What does this mean?
Thanks... (2 Replies)
Discussion started by: twk
2 Replies
7. UNIX for Dummies Questions & Answers
I want to count the number of lines in a file and store it in a variable if this count is zero i hv to throw an error ...is this syntax correct , but i am not getting the desired result
I am not using -s option here as i am concerned about record count not the size
#!/bin/ksh
set $count1... (4 Replies)
Discussion started by: mavesum
4 Replies
8. Shell Programming and Scripting
hi all,
in ksh, is there a way to throw a generic error message. i have lots of commands in my script and i didnt want to put
if ; then
doStuff();
else
print "an error occured, please run script again";
fi
around all the commands used. is there a way detect a command has... (1 Reply)
Discussion started by: cesarNZ
1 Replies
9. Shell Programming and Scripting
Guys,
I need to find all the files ending with either dmp or dmp.Z. This command is giving me error.
@files =`find $path \(-name "*.dmp" -o -name "*.dmp.Z"\) -mtime +30`;
sh: 0403-057 Syntax error at line 1 : `(' is not expected.
Thanks in advance (4 Replies)
Discussion started by: MKNENI
4 Replies
10. UNIX for Advanced & Expert Users
Can Anyone tell me how to write the Script to "find file(s) in a directory that is being accessed in last 5 minutes, and if there is result of that find, then throw the mail ".
Means throw the mail to a person regarding whoever and whenever a file is accessed in a directory.
ASAP.
Thnks. (2 Replies)
Discussion started by: varungupta
2 Replies
MONITOR(8) System Manager's Manual MONITOR(8)
NAME
monitor - Directory Server script for monitoring database performance
SYNOPSIS
monitor [ -Z serverID ] [ -D rootdn ] [ -w password ] [ -b basedn ] [-P protocol] [-h]
DESCRIPTION
Retrieves performance monitoring information. To run this script, the server must be running.
OPTIONS
A summary of options is included below:
-Z Server Identifier
The server ID of the Directory Server instance. If there is only one instance on the system, this option can be skipped.
-D Root DN
The Directory Manager DN, or root DN. If not specified, the script will search the server instance configuration for the value.
-w password
The rootdn password.
-b basedn
The DN of a backend from cn=config.
-P Protocol
The connection protocol to connect to the Directory Server. Protocols are STARTTLS, LDAPS, LDAPI, and LDAP. If this option is
skipped, the most secure protocol that is available is used. For LDAPI, AUTOBIND is also available for the root user.
-h
Display the usage.
EXAMPLE
monitor -P STARTTLS
Note: security must be enabled to use protocol STARTTLS. If STARTTLS is not available it will default to next strongest/available
protocol automatically.
monitor -Z instance2 -D 'cn=directory manager' -w password -b 'cn=monitor,cn=userRoot,cn=ldbm database,cn=plugins,cn=config'
Note: You only need to bind as the root DN if you want to look at a backend monitor.
DIAGNOSTICS
Exit status is zero if no errors occur. Errors result in a non-zero exit status and a diagnostic message being written to standard error.
AUTHOR
monitor was written by the 389 Project.
REPORTING BUGS
Report bugs to http://bugzilla.redhat.com.
COPYRIGHT
Copyright (C) 2013 Red Hat, Inc.
Mar 5, 2013 MONITOR(8)