Auf Macworld habe ich gerade einen Artikel gefunden, wie man Nagios auf einem Mac OS X 10.5 Server installiert. Ich hab den Artikel überflogen und denke, dass die Vorgehensweise genauso auch auf einer normalen Leopard Version funktioniert, denn der Autor benutzt hauptsächlich MacPorts. Wer also schon immer mal Nagios auf seinem MacBook haben wollte, kommt mit der Anleitung bestimmt weiter. Vielleicht gibts ja auch ein check_macbook_battery dazu.
Sommerhitze & Powershell 3 kleine Tipps
Sommerhitze & Powershell 3 kleine Tipps
3 kleine Tipps damit es mit den Powershell Checks auf einer Windows Kiste funktioniert.
Yep it runs under Tiger on my MacBook BUT it needs a small patch otherwise the CPU goes to 100% and the battery fairly soon afterwards to 0%.
— base/utils.c
+++ base/utils.c
@@ -3805,7 +3805,7 @@
/* worker thread – artificially increases buffer of named pipe */
void * command_file_worker_thread(void *arg){
char input_buffer[MAX_EXTERNAL_COMMAND_LENGTH];
– struct pollfd pfd;
+ fd_set fdset;
int pollval;
struct timeval tv;
int buffer_items=0;
@@ -3818,16 +3818,16 @@
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE,NULL);
pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED,NULL);
+ FD_ZERO(&fdset);
+ FD_SET(command_file_fd, &fdset);
+
while(1){
/* should we shutdown? */
pthread_testcancel();
/* wait for data to arrive */
– /* select seems to not work, so we have to use poll instead */
– pfd.fd=command_file_fd;
– pfd.events=POLLIN;
– pollval=poll(&pfd,1,500);
+ pollval = select(FD_SETSIZE, &fdset, NULL, NULL, NULL);
/* loop if no data */
if(pollval==0)