“Danger and Dread” by Brown Bird

1. Danger and Dread – Lyrics by David Lamb

Come on baby let me take your troubles away
Some mean old mama’s got your head all in a horrible way
Still for all your cryin’ and all your pain
You’re just the sweetest little woman that I’ve seen in my day
So come on pretty mama let me take your troubles away

I’ve heard you wake up cryin’ from the evils lyin’ under our bed
You say there’s no use tryin’ to protect you from the danger and dread
Though this world is made of fearsome beasts that bark and bite
We were born to put these creatures through one hell of a fight
May we feast upon the flesh of any fever that befalls you tonight

Soon her sides will split wide open
We shall feast when darkness falls
Sing until our jaws are broken
Heed the blackened water’s call

Lay down your burdens don’t you let them drag you into the ground
I know you’re hurtin’ but there’s plenty of your pain to go ‘round
Lord knows that everybody’s got a cross to bear
And I see no use in tryin’ to contrast and compare
There’s always someone being slaughtered by a bigger stack of splinters somewhere

If a day should break in anger
Patience weak and temper strong
Put our able hands to labor
We will work through what went wrong


http://www.brownbird.net/lyrics/

 

 

電車 & 香頌

這是我4月到巴黎記錄到的一段影片, 有個流浪樂手在我這節車廂上車, 他開始用手風琴演奏香頌, 香頌的節奏跟電車窗外的景致一樣在面前輕快略過, 吸引了我, 而我不好意思把鏡頭對著他錄影, 於是轉而拍向車外, 透過灰濛濛的車窗…意外的有種復古的感覺… 1分鐘的影片跟大家分享…

configure for syslog-ng , syslog-ng.conf , log server , remote log , syslog

 

// ----------------

Server: /etc/syslog-ng/syslog-ng.conf :

source remote_host {
        udp();
};

destination my_host { file("/var/log/$YEAR$MONTH$DAY.log"); };

log {
        source(remote_host);
        destination(my_host);
};

// —————-

 

Client: /etc/syslog-ng/syslog-ng.conf :

source src { unix-stream("/dev/log"); internal(); };

destination remote_server { udp("172.25.8.109" port(514)); };

log {
    source(src);
    destination(remote_server);
};

// —————- 改良版的 log server , 日期/時間比較容易看, remote server 的 IP address

 

其中 flush_lines 可以改大一點增加 log 的 performance ….

options {
  chain_hostnames(no);
  use_fqdn(no);
  use_dns(no);
  keep_hostname(no);
  flush_lines(0);
};

source remote_host {
  udp();
};

template t_rewritetime {
  template("${YEAR}-${MONTH}-${DAY} , ${HOUR}:${MIN}:${SEC} , ${HOST} , \"${MSG}\"\n");
  template_escape(no);
};

destination my_host {
  file("/var/log/$YEAR$MONTH$DAY-$HOUR.log" template(t_rewritetime) );
};

log {
  source(remote_host);
  destination(my_host);
};

// —— // —————- 改良版的 client , 保留一份 log 在本機備查

source src { unix-stream("/dev/log"); internal(); };

destination remote_server {
  udp( "172.25.8.109" port(514) );
  file("/var/log/local_log_file.log");
};

log {
  source(src);
  destination(remote_server);
};

// —–

log sample :

root@log_server:/etc/syslog-ng# tail -f /var/log/20111024-17.log
2011-10-24 , 17:21:06 , 172.25.x.107 , "crontab[12974]: (root) LIST (root)"
2011-10-24 , 17:22:01 , 172.25.x.108 , "CRON[4150]: pam_unix(cron:session): session opened for user root by (uid=0)"
2011-10-24 , 17:22:01 , 172.25.x.108 , "/USR/SBIN/CRON[4151]: (root) CMD (/usr/sbin/ntpdate 172.25.x.45)"
2011-10-24 , 17:22:01 , 172.25.x.108 , "CRON[4150]: pam_unix(cron:session): session closed for user root"
2011-10-24 , 17:22:49 , 172.30.x.43 , "sshd[5533]: Accepted keyboard-interactive/pam for monster from 172.30.x.89 port 56790 ssh2"
2011-10-24 , 17:22:49 , 172.30.x.43 , "sshd[5533]: pam_unix(sshd:session): session opened for user monster by (uid=0)"
2011-10-24 , 17:22:51 , 172.30.x.43 , "sshd[5533]: pam_unix(sshd:session): session closed for user monster"

// —- 測試 syslog 的 C – sample code :

用 C 的 sample code  

*PS: ubuntu 要先 apt-get update 再裝 apt-get install gcc build-essential

…. // —- 測試 syslog 的 PHP – sample code : , 跟 C 的版本長得一樣 ….

用 PHP 的 sample code

openlog("myScriptLog", LOG_PID | LOG_PERROR, LOG_LOCAL0);
syslog(LOG_WARNING, "Unauthorized client...." );
closelog();

….

URL: syslog-ng performance tuning 1.