2011-04-29

FreeBSD - CPU code in dmesg meanings

Platform :
FreeBSD








Objective :
What are those CPU features flags means in "dmesg", e.g.
Features=0xfebfbff&ltFPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,
PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS&gt
Features2=0x82982203&ltSSE3,PCLMULQDQ,SSSE3,CX16,SSE4.1,SSE4.2,POPCNT,
AESNI,&ltb31&gt&gt
AMD Features=0x28100000&ltNX,RDTSCP,LM&gt
AMD Features2=0x1&ltLAHF&gt

2011-04-22

Mysql - Error about packet too big while importing sql database












Q : While importing database in mysql, an error message pops out "ERROR 1153 (08S01) at line 232: Got a packet bigger than 'max_allowed_packet' bytes"
E.g.
$ mysql5 -u db_user -p db_table < db_table.sql 
Enter password: 
ERROR 1153 (08S01) at line 232: Got a packet bigger than 'max_allowed_packet' bytes
A : The file importing contains a statement that's probably too big, increase the value "max_allowed_packet" in my.cnf:

2011-04-18

Subversion - Branching and merging to release, stable or something else

Previously, we talk about the basic stuff of Subversion. This is still basic stuff :p


Is about managing source codes by branching. Branching is a way to have 2 or more sets of source code with each has it's own development, but eventually, merging them into the main trunk.

Example, in most development, we normally have "development" & "release" version. As word means, the "development" version is meant for development & testing. But the "release" version, would be the ultimate version that roll out for production use. For this example, "release" will be the trunk & "development" will be the branch.

A view of it :

web_blog(repository)
   |
   +release
   |  |
   |  +front_end
   |  |
   |  +engine
   | 
   | 
   +development
      |
      +front_end
      |
      +engine



To create this hierarchy :

2011-04-15

FreeBSD - How to check what services or port opening in tcp/udp

Platform :
FreeBSD

How to :
List/show what services or port is listening/opening.

Installation :
The command comes with base system.

2011-04-12

Nagios - Time within nagios is incorrect

Platform :
FreeBSD

Server :
Nagios

Problem :
Nagios's time stamp are incorrect, e.g. the comments section, the log file's time stamp. But the server's date, time & time zone are correct.

Cause :
Nagios configuration needs to specify the time zone offset, as well as the Apache's CGI module. These both settings make sure that nagios's time is in sync with the server's time.

Solution :

2011-04-11

AboutBSD.net - 20110411 Is back online, most of it

Managed to moved the site to another server and brought it back. If you're still seeing the "... Check back later ..." message, it is because the DNS record have not yet been refresh. Check back in another few hours.

The RSS feeds are up though. :)

2011-04-08

bash - working with ps

Platform :
FreeBSD

Objective :
To grab the process details of a pid, without resorting to parse the output of process status command , "ps" :
E.g.
ps aux | grep -i pid

2011-04-07

AboutBSD.net - 20110406 not accessible

AboutBSD.net, a BSD news planet maintain by me is currently unavailable due to some hardware issue. Please check back later.

2011-04-04

Bash - How to debug shell script

Although Bash will spit out the errors onto the screen whenever it hits one, but some times, we want to know what exactly was being done every single command it executed.

This is how to do it :
Before running the bash script, do a :
set -x
then run the script and it'll be tell every action that it performs.

This is especially useful when debugging logic.

After finding out what's wrong, this is how to turn it off :
set +x

Alternatively, to debug only when running this script, put the below line in the start of the script :
set -x
Arrivederci !!!

2011-04-01

FreeBSD - Behold, The Great Committer

Please don't scroll pass this post. This urgent & definitely needs your attention :
FreeBSD has always been something of a meritocracy, where the respect given to committers is directly proportional to the amount and quality of code they commit. This is tracked in the commit statistics. For many years, Poul-Henning Kamp (phk@) was the undisputed leader, but in 2010 his total was exceeded by relative newcomer John Baldwin (jhb@). Baldwin’s commits show no sign of slowing, and if he continues at this pace, he will soon overtake the combined totals of Foundation President Robert Watson and embedded emeritus Warner Losh.

Oh ya, make sure you have a mattress or you're stepping on a soft ground before you get hurt. Read on more here !!!

Ciao !!!

Perl - How to DOS your processor

Here's a way to maximize the CPU processor,