I am logging ipmidirect to a log file and notice that the only time the log
rotates by openhpid itself is when it restarts, so I want to use logrotate
to do it.
Here's a list of logrotate configurations I have tried:
* sending HUP signal to openhpid in the 'postrotate' script, but the
openhpid died instead of refreshing it's log FD.
* using the 'copytruncate' option. The original log maintained it's
original size (it was not truncated).
* using the 'copy' option and have a postrotate script that cat'ed
/dev/null over the original log file. The original log file still maintained
it's size.
Anyone have a solution that works for them?
using openhpi version 2.8.1
openhpi.conf
----------------------------------------
OPENHPI_ON_EP = "{SYSTEM_CHASSIS,10602}"
OPENHPI_THREADED = "YES"
OPENHPI_PATH = "/usr/lib/openhpi/"
OPENHPI_VARPATH = "/usr/lib/openhpi"
plugin libipmidirect
handler libipmidirect {
entity_root = "{SYSTEM_CHASSIS,10602}"
name = "lan" # RMCP
addr = "192.168.100.12" # VIP IP address
port = "623" # RCMP port
auth_type = "none" # none, md2, md5 or straight
auth_level = "admin" # none, callback, user, operator or admin
username = "user"
password = "password"
logflags = "file"
logfile = "/var/log/openhpid.log"
logfile_max = "1"
}
------------------------------------------
logrotate config
------------------------------------------
/var/log/openhpid.*.log {
daily
rotate 7
missingok
copyrotate
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Openhpi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openhpi-devel