2012-12-28

FreeBSD Foundation - 2012 Year-End Fundraising Campaign

Just did a quick check on the targeted $500k donations and FreeBSD Foundation have made it!
As of this post, FreeBSD Foundation have managed to surpass it's 2012 fund raising goal by $184 905, at the total of $684 905.
This is no doubt a great news to the end 2012 and I look forward to see more of these contribution towards FreeBSD Foundation, funding my favorite operating system FreeBSD.

Merry Christmas & Happy New Year !!!

AboutBSD.net - outage


This is all purely my fault as I was updating mysql-[server|client] then detach tmux, and forgot about it. I definitely need nagios to monitor AboutBSD.net. Sorry for all the inconvenience caused.

2012-08-10

2012-07-27

AboutBSD.net - Layout changes



Just did a wordpress theme change for a facelift to http://aboutbsd.net.
Probably there will be a few change on the background & header.
Do let me know if you have any suggestion.

2012-07-20

Scratch of the day - How to disable mouse gesture in Firefox on OS X

Starting from OS X snow leopard (10.6) to Lion (10.7), Firefox have a mouse gesture of swiping 2 fingers left as go back a page in history & swiping to the right as go forward a page in history. Some times it is too sensitive as I scroll up & down in text reading would also trigger this behavior. Then I need reload the page again to get back where am I.

Search in Google & Duckduckgo doesn't yield much useful instructions. But out of a sudden a bulb lights up, this could be due to the mouse gestures that is being mischievous all these times!

It turns out that turning off the "Swipe between pages" in Mouse -> More Gestures does disable this mischievous behavior. :)

Arrivederci !!!

2012-07-13

Scratch of the day - php throwing stricts error on browser

Today, I had to setup a Postgresql database server with phpPgAdmin web interface. While visiting the web interface for the first time, this error message appears on the top :







Strict Standards: Only variables should be assigned by reference in 
/usr/local/www/phpPgAdmin/classes/database/Connection.php on line 23

Warning: Cannot modify header information - headers already sent by 
(output started at /usr/local/www/phpPgAdmin/classes/database/Connection.php:23) 
in /usr/local/www/phpPgAdmin/classes/Misc.php on line 540

Seems like php 5.4.4 imposed some extra measure as best practice.

Although phpPgAdmin works as usual, the error message is annoying. Plus, it is kind of bad to show what potentially can be exploit.

To turn off these error messages, just tweak the below parameter in /usr/local/etc/php.ini :

2012-05-16

Scratch of the day - ssh transfer from server to server

There's 2 servers which configured only my workstation is able to login using ssh keys. But I need to transfer files between these 2 servers. Downloading from server A to my workstation then upload the files to server B seems to be way. It would be good if I can combine the 2 operations into 1 single execution.

With shell's pipe, cat & ssh, this is what I've come up with :
ssh bob@server-A.example.com "cat /source/file-or-directory.txt" | \
ssh bob@server-B.example.com "cat > /destination/file-or-directory.txt"

Shalom !!!

2012-05-11

Scratch of the day - exclude logging to /var/log/messages

After telling dhcpd to log messages to local7 of syslogd, "uid lease" messages are still being log in /var/log/messages. This is because by default, syslogd logs "notice" level and above to /var/log/messages.

If you don't wanna see these messages in /var/log/messages, which it has already log to /var/log/dhcpd.log, include the log level "none" that tells syslogd logs to /var/log/messages. This assumed that dhcpd is configured to use log facility "local7" in it's config file, that output all messages to /var/log/dhcpd.log.


Example :
(in /etc/syslog.conf)
----- snip -----
*.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err;local7.none   /var/log/messages
----- snip ----

Reload syslogd and monitor /var/log/messages & /var/log/dhcpd.log :

/etc/rc.d/syslogd reload

Namaste !!!

2012-04-13

Scratch of the day - ISC dhcpd is complaining about subnet declaration

Just now, restarting the ISC DHCP server, after adding new subnet, spill out some error messages :
No subnet declaration for gem0 (192.168.168.168).
** Ignoring requests on gem0.  If this is not what
   you want, please write a subnet declaration
   in your dhcpd.conf file for the network segment
   to which interface gem0 is attached. **

Sending on   Socket/fallback/fallback-net

This is because the DHCP server doesn't find any "subnet" declaration on the IP used on interface gem0. Tell DHCP server to listen on the intended interface by putting the below line in /etc/rc.conf :

dhcpd_ifaces="gem1"

This will make DHCP server listen on "gem1" and ignore listening on "gem0".

Adios !!!

2012-04-09

Scratch of the day - arpresolve: can't allocate llinfo

Today, one of the server was uncontactable after a network switch flood incident. All other servers are working fine except this one. Log into this server through the console, reveals :
- ping to gateway is fine
- ping to a host outside this network failed
- ssh connection to same segment is fine but not beyond gateway





/var/log/messages has a dozens of dozens of these :
Apr  9 00:30:01 hostname kernel: arpresolve: can't allocate llinfo for 10.0.0.1
Apr  9 00:31:00 hostname kernel: arpresolve: can't allocate llinfo for 10.0.0.1
Apr  9 00:32:00 hostname last message repeated 15 times 

It looks like connection from this server to machines within it's own segment is fine but other then that, all are unavailable. Another thing, machines connected before initiated from this server to it, is fine. Connections from other server within own segment to this server (if NOT initiated by this server before) still failed.

After some googling, it seems like a patch is needed to fix this error :
http://lists.freebsd.org/pipermail/freebsd-net/2011-August/029687.html

Since the arp cache might be leaking and causes the table to be corrupted, a reboot is needed for the network stack to work. After reboot, the usual patching applies.

The moral of the story, updating FreeBSD is as important upgrading ports. :p

Ciao !!!

2012-02-15

Scratch of the day - dmesg log is not at /var/log

dmesg log is the place where system information are written to it, similar to /var/log/messages. It is particularly useful to get information of Hardware details. But after some time, the information in /var/log/dmesg.today & /var/log/dmesg.yesterday are replaced with system messages where by boot messages are replaced.

Fortunately, a copy of boot messages in dmesg are still available in :

/var/run/dmesg.boot

Au revoir !!!

2012-01-25

FreeBSD - Running Puppet on FreeBSD

The latest issue of BSD Magazine is out and guess what? It has an article that I've wrote on running Puppet on FreeBSD!

BSD Magazine is a free to download magazine that focus on BSD, be it FreeBSD, OpenBSD, NetBSD, PC-BSD and others. From BSDMag.org website :

"We decided to create a magazine for BSD users, enthusiasts and communitites. There were lots of Linux magazines and none devoted to BSD systems. Does that mean Linux is better than BSD? Not at all!"


To download a copy of the BSD Magazine, just register your email address with BSD Magazine and the download will be available. Spread the news, this magazine is full of BSD related news, tutorials, tips & tricks.

The BSD community needs more of these valuable resource!

Ciao !!!

2012-01-09

Scratch of the day - Real time network statistic, like top

There's a sudden surge of network traffic in one of the servers and I need to find out what causes it. Roaming around ports show up this :

/usr/ports/net-mgmt/iftop

iftop does for network usage what top(1) does for CPU usage ...
(via)

To start monitoring :