mysql logging

There’re 2 ways to enable mysql query logs

in /etc/my.cnf

log=/var/log/mysqld-query.log

or add ” –log” in start script

/usr/bin/mysqld_safe –datadir=”$datadir” …. –log >/dev/null 2>&1 &

How to stop binary log
remove the following from my.cnf

log-bin=mysql-bin
binlog_format=mixed

San Gabriel River East Fork Hiking

This is a famous hiking trail for summer season, because of the river is still full of water in the heated days, with 100F+ temperature. The parking lot was full before we got there. we have to walk longer in the hot sun.
As soon as we came to the trail head, we found out we needed to cross the river already. Walking through the river was fun, and something very different with other hiking. We tried to count how many times we had to cross the river but somehow forgot about it when we got lost from the trail. Some spot where to cross the river were obvious but some are hidden.
Even it was not comfortable to walk almost 10 miles with wet shoes, it was a great hike . We turned around before half mile to the “bridge to nowhere” since I got a headache in the heat. But I will see it next summer.

telnet smtpserver 25

HELO smtp.lalife.net
MAIL FROM: test@localhost
RCPT TO: test@lalife.net
DATA
FROM:test@localhost
Subject: test smtp
test smtp.
.
QUIT

Another way to send mail by command line
echo “testmail” | mail -s “test” yan@yan.lalife.net

Ice House Saddle Trail

[singlepic id=43 w=320 h=240 float=left]The past Saturday was a hot summer day in east LA area. We planned to hike up to Ice House Saddle before noon to avoid the heat.
It was pretty warm there on the trail but fortunately many trees gave us a nice shade here and there. A beautiful creek was running along at the beginning of the trail. Even in July there was a good amount of water, which added a high light to the hike. Maybe because of the creek, it was quite popular. On the way going up we met many hikers, especially asian hiker groups.
The trail was 7 miles long, 2300 feet escalation. After half way, we found that the trail started getting very steep, and the steepness almost lasted till the saddle. The saddle was a nice rest area with many trees and cooler wind. Several signs showed that it’s also a place that connects to trails to other famous peaks nearby, such as 3T (Timber, Telegraph, Thunder), Cucamonga peak, Mt Baldy, etc.
Because of the steep part, my legs got pretty tired on the way back. But it was a great work out. I am sure my legs got much stronger after this hike.
On the picture, you can see Mt Baldy, where we hiked up last year, clearly from half way to the saddle.

iptraf

iptraf is a tool used to monitor the network traffic

To add more ports (beyond 104)
iptraf > Enter > Configure > Additional Ports

To change log interval
iptraf > Enter > Timers > Logging interval

Add/Delete/Active/Unactive Filter
iptraf > Enter > IP

Monitor traffic statistics by port
iptraf > Enter > Statistical breakdowns…

To run iptraf background for 10 min and send data to log files
/usr/bin/iptraf -B -s eth0 -t 10

Log file is under /var/log/iptraf/ by default