Are you logging just a small block now and then, or streaming to the log on a pipe? For the first, just put the date or time in the file name, and it grows a new file every hour, shift, day, week, month. For the latter, some side process needs to interrupt it using kill, to send it to trap, to start a new log with an entry pointing to the old log, if that works then close off writing the old log with an entry tying it to the new log and finally, delete any excess logs, without closing the input pipe. When writing blocks, if there are many logging processes, be sure to log whole blocks in one write so lines are not split or intermingled. Pile the message elements up in vm:
or an env var:
and then echo it out.
Hi,
I am running a script where i need to run another command in a particular folder which I do not have access so I need
to login as su to that folder and run that script...what are the options I need so that I
can skip interactive mode ..here is what I tried..
#! /usr/bin/sh... (2 Replies)
Hi
I want to keep my script running even when i am logged off from the box.
can we run the script in background which can automatically run every hour?
Please advise.
Thank you (1 Reply)
Hello everybody,
I have one small issue... :(
When i'm trying to connect another unix box through below script..
#!/usr/bin/bash
ssh $1 <<EOF
Commands
.
.
exit
EOF
But getting some syntax error "-sh: syntax error at line 2: `end of file' unexpected". I used to use... (2 Replies)
Hello
I wrote a nice Perl script that is intended to find and copy some files when getting a TERM signal. Now I wanted to make a shell script that starts/restarts the Perl script if it crashes/ends because of errors and make a log of all output the Perl Script gives. The problem is that it won't... (1 Reply)
Hello
I wrote a nice Perl script that is intended to find and copy some files when getting a TERM signal. Now I wanted to make a shell script that starts/restarts the Perl script if it crashes/ends because of errors and make a log of all output the Perl Script gives. The problem is that it won't... (11 Replies)
We had a system outage, and now I am trying to figure out how to get raw data to store in a log file.
I have a flat file that has multiple IP port line.
I want to telnet to each and log each.
But as soon as I connect to the first, it stays there.
This is on an HPUX 11.23 system. I dont think... (1 Reply)
Bash on Oracle Linux 6.3
I have a shell script whose output I want to redict to a log file. So, I can simply redirect the output as shown below.
# cat myscript.sh
#### I actually want some logging mechanism here which will redirect the output to a log file
echo 'hello world'
#... (3 Replies)
When unlocking a Linux server's console there's no event indicating successful logging
Is there a way I can fix this ?
I have the following in my rsyslog.conf
auth.info /var/log/secure
authpriv.info /var/log/secure (1 Reply)
Discussion started by: walterthered
1 Replies
LEARN ABOUT SUNOS
picld_log
picld_log(3PICLTREE) PICL Plug-In Library Functions picld_log(3PICLTREE)NAME
picld_log - log a message in system log
SYNOPSIS
cc [flag ...] file ... -lpicltree [library ...]
#include <picltree.h>
void picld_log(const char *msg);
DESCRIPTION
The picld_log() function logs the message specified in msg to the system log file using syslog(3C). This function is used by the PICL dae-
mon and the plug-in modules to log messages to inform users of any error or warning conditions.
RETURN VALUES
This function does not return a value.
ERRORS
No errors are defined.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO syslog(3C), attributes(5)SunOS 5.10 28 Mar 2000 picld_log(3PICLTREE)