07-14-2008
syslog
Suggest upgrading to syslog-ng. You're gonna love it.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm a newbie to the Unix world Help!
I have to maintain a host of Sybase database servers sitting on Unix Sun Solaris 8...I've been tasked with finding/creating a way to auto start/stop Unix via unix commands, specifically when the Unix servers need to be restarted we want Sybase to start... (2 Replies)
Discussion started by: jjv1
2 Replies
2. UNIX for Advanced & Expert Users
Hi all,
I joined this forum today and this is my first question. I thank you all for viewing it. I will try to be brief.
The OS: HP-UX B.11.11 U 9000/800
There are lot of cron scheduled perl scripts running on this server, which do different things at different time. Some of them process... (10 Replies)
Discussion started by: bluesky099
10 Replies
3. AIX
Hi,
Very new to aix
How to start/stop/restart NFS on AIX
thanks, (2 Replies)
Discussion started by: jredx
2 Replies
4. Shell Programming and Scripting
I'm wondering how I should make a script that can start, stop, and restart another script.
What I need to be able to do, is start and stop a perl script from the command line. The easiest way of doing this seems to be to have another script, starting and stopping the other script. I have BASH,... (7 Replies)
Discussion started by: Bakes
7 Replies
5. Shell Programming and Scripting
Hi,
Every time i want to stop and start servers using PuTTY,i have to execute 6 to 10 commands every time ,i need shell script(program) for execute those commands in single command.Is it possible plz suggest me. (3 Replies)
Discussion started by: RG18173
3 Replies
6. Shell Programming and Scripting
HI
I am using below code to start and stop servers but it is not working ,how to run the script please suggest me ,if any errors in the script please let me know.
#!/bin/bash
IMS_START="/Webserver/AppServer/bin/startServer.sh"
IMS_STOP="/Webserver/AppServer/bin/stopServer.sh"
case "$1" in
... (1 Reply)
Discussion started by: RG18173
1 Replies
7. Shell Programming and Scripting
Hi All,
is there a way or script that i can check my AIX 5.3 OS will restart before i made restart? is there a script that can check all the startup files are ok before restarting. it is because i was stuck last time when i restart my PC because some startup files were missing:o. (2 Replies)
Discussion started by: malcomex999
2 Replies
8. UNIX for Dummies Questions & Answers
Is there any functional difference between:
issuing separate stop/start commands like this;
super (handler) (instance) stop
super (handler) (instance) start
versus issuing a single recycle command like this;
super (handler) (instance) restart (3 Replies)
Discussion started by: Newbix
3 Replies
9. Shell Programming and Scripting
Here it goes from my unexperienced point of view. I am using CentOS 5.6. I have a Java based server that needs to be running 24/7/365. To begin from the machine the server is on rebooting; I SSH in to a shell, cd to the server dir, screen -S server1, and execute ./exec (listed below) in the screen.... (12 Replies)
Discussion started by: MacG32
12 Replies
10. Red Hat
This issue could happen to any other service but in this case its commssioning Postfix - it seems i can't stop postfix as the PID relates to another service - i've delete the 'master.lock' but to no available - any ideas, memeory commands etc ?
thanks in advance
ps. the serve is in Production so... (2 Replies)
Discussion started by: stevie_velvet
2 Replies
SYSLOG(3) 1 SYSLOG(3)
syslog - Generate a system log message
SYNOPSIS
bool syslog (int $priority, string $message)
DESCRIPTION
syslog(3) generates a log message that will be distributed by the system logger.
For information on setting up a user defined log handler, see the syslog.conf(5) Unix manual page. More information on the syslog facili-
ties and option can be found in the man pages for syslog(3) on Unix machines.
PARAMETERS
o $priority
-$priority is a combination of the facility and the level. Possible values are:
syslog(3) Priorities (in descending order)
+------------+------------------------------------+
| Constant | |
| | |
| | Description |
| | |
+------------+------------------------------------+
| | |
| LOG_EMERG | |
| | |
| | system is unusable |
| | |
| | |
| LOG_ALERT | |
| | |
| | action must be taken immediately |
| | |
| | |
| LOG_CRIT | |
| | |
| | critical conditions |
| | |
| | |
| LOG_ERR | |
| | |
| | error conditions |
| | |
| | |
|LOG_WARNING | |
| | |
| | warning conditions |
| | |
| | |
|LOG_NOTICE | |
| | |
| | normal, but significant, condition |
| | |
| | |
| LOG_INFO | |
| | |
| | informational message |
| | |
| | |
| LOG_DEBUG | |
| | |
| | debug-level message |
| | |
+------------+------------------------------------+
o $message
- The message to send, except that the two characters %m will be replaced by the error message string (strerror) corresponding to
the present value of errno.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
Using syslog(3)
<?php
// open syslog, include the process ID and also send
// the log to standard error, and use a user defined
// logging mechanism
openlog("myScriptLog", LOG_PID | LOG_PERROR, LOG_LOCAL0);
// some code
if (authorized_client()) {
// do something
} else {
// unauthorized client!
// log the attempt
$access = date("Y/m/d H:i:s");
syslog(LOG_WARNING, "Unauthorized client: $access {$_SERVER['REMOTE_ADDR']} ({$_SERVER['HTTP_USER_AGENT']})");
}
closelog();
?>
NOTES
On Windows NT, the syslog service is emulated using the Event Log.
Note
Use of LOG_LOCAL0 through LOG_LOCAL7 for the $facility parameter of openlog(3) is not available in Windows.
SEE ALSO
openlog(3), closelog(3).
PHP Documentation Group SYSLOG(3)