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-25
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 :
To start monitoring :
/usr/ports/net-mgmt/iftop
iftop does for network usage what top(1) does for CPU usage ...(via)
To start monitoring :
2011-12-30
Scratch of the day - Back dated date
Did some sysctl tuning and need to monitor the log file every "yesterday". This is what I've managed to split out from "strftime" manual (via "date") :
With this, make cron send me an email with filtered entries of /var/log/messages :
See ya !!!
# date Fri Dec 30 09:59:27 MYT 2011 # date -v -1d +%b\ %Oe Dec 29
With this, make cron send me an email with filtered entries of /var/log/messages :
1 1 * * * grep "`date -v -1d +\%b\ \%Oe`" /var/log/messages | mail -s "Yesterday ..." root@example.com
See ya !!!
2011-12-06
FreeBSD Foundation - 2011 Year End Fundraising Campaign
Another year is passing and the season of giving is coming !!!
This year, the FreeBSD Foundation is targeting to raise 400k. These funds will be put into the good use of FreeBSD related activities :
(via here)
If you find that using FreeBSD is fun & useful, please donate to the foundation. Donating to the FreeBSD Foundation is the most effective way to promote & sponsor this wonderful OS. Plus, having your name on the donation list does draw some "feel good" feeling. :)
By the way, all it takes for your name to appear in the donation list is just mere USD 5. Click on this link to DONATE.
Adios !!!
This year, the FreeBSD Foundation is targeting to raise 400k. These funds will be put into the good use of FreeBSD related activities :
- sponsor BSD conferences & events
- sponsor developers to attend these conferences
- protect the intellectual property of the FreeBSD project
- marketing of FreeBSD project
- hardware procurement for FreeBSD infrastructure
- R & D to enhance the FreeBSD OS
(via here)
If you find that using FreeBSD is fun & useful, please donate to the foundation. Donating to the FreeBSD Foundation is the most effective way to promote & sponsor this wonderful OS. Plus, having your name on the donation list does draw some "feel good" feeling. :)
By the way, all it takes for your name to appear in the donation list is just mere USD 5. Click on this link to DONATE.
Adios !!!
2011-11-19
FreeBSD - HP DL 120 G7 hardware
Recently, I had a chance to test the compatibility of installing FreeBSD on an HP server. This are the specs of the server :
HP DL 120 G7 E3-1240
- 16gb DDR 3 ram
- dual nic port (HP NC112i 1-Port Ethernet Server Adapter (x2))
- Array Card (HP Smart Array P212/256MB Controller (RAID 0/1/1+0/5/5+0))
The NICs, Smart Array & hard disk all work fine.
Except this server came connected with the SATA hdd to the Smart Array. I've always skeptical about RAID cards, especially if the RAID card is faulty, we'll need to get the same RAID card in order for the data to be recognize. That sucks big time.
End up, I bypass the SATA hdd from Smart Array to the on-board connector. Now, ZFS is just ready to rock. :)
Ciao !!!
2011-10-30
FreeBSD - Mounting NFS share gives error "timed out"
Connecting to a NFS server from a FreeBSD installation hit an error. The command executed was :
The error :
The firewall has open port 111 (portmapper) & 2049 (mountd), so that should clear some of the permission. But still no luck.
Checking network connections doesn't seems to show anything interesting, particularly in ESTABLISHED & LISTEN state connections.
E.g.
But checking the NFS server info from the NFS client do reveal some interesting info :
Seems like these services "mountd", "nlockmgr", "rquotad" & "status" are needed. Those services translate to port no. 4045, 4046, 4047 & 4049.
After opening these ports in firewall, the NFS share mount finally works.
Voilla !!!
mount -t nfs nfs.example.com:/vol/some/nfs/share /mnt/mount/point
The error :
[tcp] nfs.example.com:/vol/some/nfs/share: RPCMNT: clnt_create: RPC: Remote system error - Operation timed out
The firewall has open port 111 (portmapper) & 2049 (mountd), so that should clear some of the permission. But still no luck.
Checking network connections doesn't seems to show anything interesting, particularly in ESTABLISHED & LISTEN state connections.
E.g.
netstat -an
But checking the NFS server info from the NFS client do reveal some interesting info :
# rpcinfo nfs.example.com
program version netid address service owner
100024 1 tcp 0.0.0.0.15.207 status unknown
100024 1 udp 0.0.0.0.15.207 status unknown
100011 1 udp 0.0.0.0.15.209 rquotad unknown
100021 4 tcp 0.0.0.0.15.205 nlockmgr unknown
100021 3 tcp 0.0.0.0.15.205 nlockmgr unknown
100021 1 tcp 0.0.0.0.15.205 nlockmgr unknown
100021 4 udp 0.0.0.0.15.205 nlockmgr unknown
100021 3 udp 0.0.0.0.15.205 nlockmgr unknown
100021 1 udp 0.0.0.0.15.205 nlockmgr unknown
100005 3 tcp 0.0.0.0.15.206 mountd unknown
100005 2 tcp 0.0.0.0.15.206 mountd unknown
100005 1 tcp 0.0.0.0.15.206 mountd unknown
100005 3 udp 0.0.0.0.15.206 mountd unknown
100005 2 udp 0.0.0.0.15.206 mountd unknown
100005 1 udp 0.0.0.0.15.206 mountd unknown
100003 3 tcp 0.0.0.0.8.1 nfs unknown
100003 2 tcp 0.0.0.0.8.1 nfs unknown
100003 3 udp 0.0.0.0.8.1 nfs unknown
100003 2 udp 0.0.0.0.8.1 nfs unknown
100000 2 tcp 0.0.0.0.0.111 rpcbind unknown
100000 2 udp 0.0.0.0.0.111 rpcbind unknown
Seems like these services "mountd", "nlockmgr", "rquotad" & "status" are needed. Those services translate to port no. 4045, 4046, 4047 & 4049.
After opening these ports in firewall, the NFS share mount finally works.
Voilla !!!
2011-10-22
Cross cable color code
A note for myself. This is the cable code to crimp cross cable, to be use for PC to PC connectivity (without switch in between)
First end
1.w-gr
2. gr
3.w-or
4. bl
5.w-bl
6. or
7.w-br
8. br
The other end
1.w-or
2. or
3.w-gr
4. bl
5.w-bl
6. gr
7.w-br
8. br
or = orang
gr = green
bl = blue
br = brown
w = white
When using cable testing device, the LED should blink crossing :
- 1 -> 3
- 2 -> 6
- 3 -> 1
- 6 -> 2
Ciao !!!
2011-10-15
2011-10-10
Perl - Modern Perl
Modern::Perl perl module automatically loads :
Adios !!!
Ref :
use warnings; use strict; use 5.010;These are essential stuff to load and "use Modern::Perl;" (17 characters) loads it all. This saves typing and now, more reason to use "strict", "warnings" with "modern" perl features. :)
Adios !!!
Ref :
2011-10-02
FreeBSD - Updated device names in new GENERIC kernels
This just caught my attention. There's some changes in device naming convention for the latest GENERIC kernel, that comes with default installations of FreeBSD.
An abstract (via) :
The GENERIC kernels for all architectures now default to the new
CAM-based ATA stack. It means that all legacy ATA drivers were
removed and replaced by respective CAM drivers. If you are using
ATA device names in /etc/fstab or other places, make sure to update
them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY,
where 'Y's are the sequential numbers starting from zero for each type
in order of detection, unless configured otherwise with tunables,
see cam(4)).
For more feeds on these, check out http://updating.versia.com/.
Ciao !!!
2011-09-29
FreeBSD - Nostalgic versions of FreeBSD
Was searching for archived versions of FreeBSD 4.11 and found this link through one of the README.TXT in the usual mirror ftp servers of FreeBSD.
Archive or old version of FreeBSD can be download from here :
ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/
Namaste !!!
Archive or old version of FreeBSD can be download from here :
ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/
Namaste !!!
2011-09-26
FreeBSD - Fun in typo for listing directory
Stumble across this port while doing some research. Go ahead and install it :
Now, suppose we're gonna type "ls" for listing directory contains, but fat fingers make us type "sl" instead. After installing the port, try typing "sl" to list in the commandline and interesting stuff happens !
Misspelling directory listing ("ls") is never gonna be the same again ... :p
Shalom !!!
cd /usr/ports/games/sl make install clean
Now, suppose we're gonna type "ls" for listing directory contains, but fat fingers make us type "sl" instead. After installing the port, try typing "sl" to list in the commandline and interesting stuff happens !
Misspelling directory listing ("ls") is never gonna be the same again ... :p
Shalom !!!
2011-09-23
FreeBSD - Another example why dotcom servers choose FreeBSD
1 million concurrent TCP session, what kind of app need this???
Is WhatsApp :D
"...
Over the past few months we have been making a lot of improvements to our servers to increase the performance, uptime and scalability. Today we have tuned some knobs, shifted some traffic around and achieved 1 million established tcp sessions on a single machine (and with memory and cpu to spare!)
$ netstat -an | grep -c EST
1016313
We are extremly proud of this achievement and wanted to share with other tech minded people out there. For those curious how we did it, the technology on the backend is simple: FreeBSD + Erlang
..."
Taken from here.
Ciao !!!
2011-09-18
FreeBSD - PHPMyAdmin Error on initial setup
After the first time installation of FAMP (FreeBSD, Apache, MySQL & PHP) with PHPMyAdmin, an error message pops out when visiting PHPMyAdmin's page. The error message goes like this :
This is because the "ArrayObject" class is not enable in the required libraries and it can be solve by setup the proper parameters in php.ini. The recommended php.ini that comes with ports is sufficient to solve this problem. For my case, copying the recommended php.ini solve it. Here it goes :
Fatal error: Class 'ArrayObject' not found in /usr/local/www/phpMyAdmin/libraries/List.class.php on line 16
This is because the "ArrayObject" class is not enable in the required libraries and it can be solve by setup the proper parameters in php.ini. The recommended php.ini that comes with ports is sufficient to solve this problem. For my case, copying the recommended php.ini solve it. Here it goes :
2011-07-27
Perl - Apple finally bump Perl to 5.12.3
$ /usr/bin/perl -v This is perl 5, version 12, subversion 3 (v5.12.3) built for darwin-thread-multi-2level (with 2 registered patches, see perl -V for more detail) Copyright 1987-2010, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using "man perl" or "perldoc perl". If you have access to the Internet, point your browser at http://www.perl.org/, the Perl Home Page.
Although this is not the latest of greatest but this is definitely better of version 5.10.0 :p
Adios !!!
2011-07-26
OSX - Macports upgrade outdated ports hits error
OS X Lion 10.7 just released and I've join in the club to upgrade my mac. As usual, macports needs to be refresh before knowing what it upgrade :
Next, upgrade the ports as usual :
port -v selfupdate
Next, upgrade the ports as usual :
2011-06-03
AboutBSD.net - We're IPv6 ready!
AboutBSD.net can be accessible through IPv6 using http://v6.aboutbsd.net ...
2011-05-20
Puppet - How to list facts in facter in Puppet
Was messing around puppet and trying to get a list of "facts". Google & searching on puppet labs didn't return any luck. Most of the search result points to bug reports.
With no luck at all, I gotta skim through the docs to find the list of facts for my new toy (puppet). Stumble this link that actually points where the light is.
In short, to list the facts of puppet, do this in command line :
facter | less
Hopefully this post will shed some light onto people searching on how to list facts in puppet.
Ciao !!!
2011-04-29
FreeBSD - CPU code in dmesg meanings
Platform :
FreeBSD
Objective :
What are those CPU features flags means in "dmesg", e.g.
FreeBSD
Objective :
What are those CPU features flags means in "dmesg", e.g.
Features=0xfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV, PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS> Features2=0x82982203<SSE3,PCLMULQDQ,SSSE3,CX16,SSE4.1,SSE4.2,POPCNT, AESNI,<b31>> AMD Features=0x28100000<NX,RDTSCP,LM> AMD Features2=0x1<LAHF>
Subscribe to:
Posts (Atom)






