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

vnstat — monitoring network traffic

Install vnstat
tar -zxvf vnstat-1.xx.tar.gz

Compile and install
make all
make install

Use vnstat
create new database
vnstat -u -i eth0
database is created under /var/lib/vnstat/eth0

Setup cron to collect data
copy from examples/vnstat.cron

#vnstat
#vnstat -i eth0
#vnstat -d
#vnstat -m

rx = recieved
tx = transmitted

我喜欢的日本猪肉酱汤

[singlepic id=42 w=320 h=240 float=left]日本猪肉酱汤在日语中写为”猪汁“,是我非常喜欢的日本家庭菜。过一段时间就会做一大锅,因为味道很好,做起来也容易,吃后觉得胃里也很舒服。
”猪汁“里有肥瘦都有的切得很薄的猪肉片,牛蒡,白萝卜,魔芋丝,芋头,香菇,当然还有日本的酱汁。除了酱汁之外,前三样是必须有的,后三样没有也可以。我有的时候还加些甘蓝。酱要最后关火之前放入。
热呼呼的来上一大碗,菜肉都有了,就着新做的白米饭,真是棒极了!

Will Rogers Park and Backbone Trail

Will Roger’s park is a beautiful park, we’ve been there many times, but this was the first time we hiked it through to the Backbone Trail.
Hard to believe it’s in July. We got a really foggy, cool morning, for a while it was raining a little bit. So even there’s no much shade, it was a very comfortable day for hiking. Many wild flowers are still waiting for us on the side of the well maintened trail. The trail eventually turned narrow and with a lot high grasses on the side when our GPS showing it’s almost 3 miles away from our car. We turned around after it reached 3 miles. The fog got thinner on the way back, so we could see the coast line clearly.
It is a nice hiking trail if you don’t want to drive far.

Horseshoe Meadows and Trail Peak

[singlepic id=33 w=320 h=240 float=left]We hiked in Horseshoe Meadows on Saturday, which is in Southern Sierra, California.
Stayed in Lone Pine for a really hot Friday night (95F), I was glad to get some fresh air in the mountains. The car drove up a zig-zag shaped road from 3000ft to 10000ft and we got to the parking lot. It was 60F there, which was much cooler than Lone Pine. There were already some people and cars there, some looked like they stayed overnight in the camping ground.
The meadow was beautiful with clear creeks. Golden trout are protected here. Leaving the peaceful meadow behind, we walked through a very steep part covered by forest formed by pines. I had to walk extremely slow because the high altitude. When getting close to the peak, I got some headache but not so bad. It was cold up there, we still saw some snow patches. Finally we got up to the Trail peak, 11605ft. The big mountains with snow close by gave a great view. You feel like they are saying “we are the greater mountains”.
The round trip was 7.5 mile and 2000ft elevation up according to our GPS.

Wild Flower in Death Valley

[singlepic id=15 w=320 h=240 float=left]

To our surprise, there’re quite a lot wild flowers this spring in death valley national park. And also many types of them, which we’ve never seen in the state parks in Los Angeles.

Among them the most attractive one is this red cacti flower.