*This is not homework I am new to UNIX and want to try this Monitoring a file demo*
*If this is the wrong forum please move it - im new to the forums*
$1 = the file to be monitored
$2 = the time for the file to sleep
If the file gets changed (using -nt) it will send my username mail saying its changed it. The problem im having is it goes into an endless loop, im just learning the while loop so im guessing its that. Also I dont understand the whole mail code - how do I input subject and stuff.
Hello all. Let me start off by saying I know a little more then it seems by me asking this question... here goes
I have an old 486 box and I want to start messing around with unix. I've been taking classes for 3 or 4 years in c programming in unix, so I am used to the commands and such, but I... (1 Reply)
Hi! I have a simple question about using a for loop.
I'm trying to open up all the zip files in the currect directory with ark, but I am getting the error "bash: syntax error near unexpected token `for $i ; do ark $i ; done ;
I looked in the info pages for bash, but I can't seem to figure... (2 Replies)
Hello there
Been using Unix bash scripting for two days now so am very new to this. I am currently doing a project now and i'm basically making a noughts and crosses game (or tic tac toe).
I have created the board using an array. When I try and check to see if the array is empty using an If... (3 Replies)
I have a csv file with 3 columns. Column 1 is a date "mm/dd/yyyy", column 2 is a dollar amount (e.g. "100.00") & column 3 in a description of where the transaction took place (e.g. "CHECK CRD PURCHASE 10/07 ACME INC USA")
so...
"10/01/2009","100.00", "CHECK CRD PURCHASE 10/07 ACME INC USA"
I... (1 Reply)
No doubt these questions have been answered many times, but I struggled to find them - sorry. 2 questions:
1. I wish to read in a file one line at a time and do 'stuff' with it, such as:
file="tst2"
while IFS= read -r line
do
echo `wget -qO -... (3 Replies)
Hi, I am trying to make a script to manage log. I want to write the name of the .gz I moved and the date :
for i in `ls $replog/*.gz`
do
echo " $i "
`echo $i date +%d:%m:%Y`
`echo $datee `>> $replog/mrnet.log
mv $i /var/log/vieux-logs
done
I need to echo... (10 Replies)
Hi All,
I am trying to monitor CPU load of few processes, with the same name.
The output that I get from top is the following
28171 root 20 0 1089m 21m 3608 S 103 0.3 15:16.89 /opt/ppp//h264rtptranscoder.bin --videoPort=14504 --audioPort=14505
27589 root 20 0 1060m 23m... (3 Replies)
Hello,
I am creating a new disk using the following command:
dd if=/dev/zero of=/export/home/ramdisk/0 bs=512 count=4096k
after creating the disk, i tool a ufsdump of a solaris 10 filesytem (disk size 512MB)
ufsdump -cvf /export/home/ufsdump/sol_orig /and then restored the dump files onto... (10 Replies)
Discussion started by: Zam_1234
10 Replies
LEARN ABOUT NETBSD
rpc.statd
RPC.STATD(8) BSD System Manager's Manual RPC.STATD(8)NAME
rpc.statd -- host status monitoring daemon
SYNOPSIS
rpc.statd [-d]
DESCRIPTION
rpc.statd is a daemon which co-operates with rpc.statd daemons on other hosts to provide a status monitoring service. The daemon accepts
requests from programs running on the local host (typically, rpc.lockd(8), the NFS file locking daemon) to monitor the status of specified
hosts. If a monitored host crashes and restarts, the remote daemon will notify the local daemon, which in turn will notify the local pro-
gram(s) which requested the monitoring service. Conversely, if this host crashes and restarts, when rpc.statd restarts, it will notify all
of the hosts which were being monitored at the time of the crash.
Options and operands available for rpc.statd :
-d The -d option causes debugging information to be written to syslog, recording all RPC transactions to the daemon. These messages are
logged with level LOG_DEBUG and facility LOG_DAEMON. Error conditions are logged irrespective of this option, using level LOG_ERR.
The rpc.statd daemon must NOT be invoked by inetd(8) because the protocol assumes that the daemon will run from system start time. Instead,
it should be configured in rc.conf(5) to run at system startup.
FILES
/var/db/statd.status non-volatile record of currently monitored hosts.
/usr/include/rpcsvc/sm_inter.x RPC protocol specification used by local applications to register monitoring requests.
SEE ALSO syslog(3), rc.conf(5), rpc.lockd(8)STANDARDS
The implementation is based on the specification in X/Open CAE Specification C218, "Protocols for X/Open PC Interworking: XNFS, Issue 4",
ISBN 1 872630 66 9
HISTORY
A version of rpc.statd appeared in SunOS 4.
BUGS
There is no means for the daemon to tell when a monitored host has disappeared permanently (e.g., catastrophic hardware failure), as opposed
to transient failure of the host or an intermediate router. At present, it will retry notification attempts at frequent intervals for 10
minutes, then hourly, and finally gives up after 24 hours.
The protocol requires that symmetric monitor requests are made to both the local and remote daemon in order to establish a monitored rela-
tionship. This is convenient for the NFS locking protocol, but probably reduces the usefulness of the monitoring system for other applica-
tions.
The current implementation uses more than 1Kbyte per monitored host in the status file (and also in VM). This may be inefficient for NFS
servers with large numbers of clients.
BSD September 19, 1995 BSD