Thursday, August 23, 2007

HP-UX: Processors

[ROOT abc24]usr/sam # /usr/sbin/diag/contrib/pdcinfo -no_banner | grep "CPU("
CPU(0)  PA8700 3.1
CPU(1)  PA8700 3.1
CPU(2)  PA8700 3.1
CPU(3)  PA8700 3.1
CPU(0)  PA8700 3.1
CPU(1)  PA8700 3.1
CPU(2)  PA8700 3.1
CPU(3)  PA8700 3.1
[ROOT abc24]/tmp # echo "selclass qualifier cpu;info;wait;infolog" | cstm > /tmp/cpuinfo

read more...

Wednesday, August 22, 2007

Commandszz

One command looks like interesting, worth to look up for this:
pax - Extracts, writes, and lists archive files; copies files and directory hierarchies

read more...

Tuesday, August 21, 2007

HP-UX, bdf, du and ...

If you ever encounter a file system full, say, at this particular partition:
[ROOT gitu2]Z24/X41 # uname -a
HP-UX gitu2 B.11.11 U 9000/800 170187401 unlimited-user license
[ROOT gitu2]Z24/X41 # bdf /usr/sap/Z24/X41
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol30 4620288 4610752 9038 100% /usr/sap/Z24/X41
[ROOT gitu2]Z24/X41#


and you have been trimming, deleting files like crazy, say, you've delete a 1.7G file but when you issue bdf, the utilization still at 100%. But when you checked with du, it shows the current utilization on that particular partition/directory has been reduced. WTF?!

read more...

Thursday, August 16, 2007

Nifty...

Are you a Firefox fan? You might wanna try this: Roll Your Own Firefox™ Search Bar

read more...

Monday, August 13, 2007

Mari Tolak Beskal Session #1: FRIM "Dream Trail"

Yesterday my friend and I went to our first Bash (bike hash) at FRIM Dream Trail. Later lah full details.

read more...

Lesson Learned

Spending on more that 13 hrs in the office last Saturday gave us some real good lessons.

read more...

Friday, August 10, 2007

Linux "grep -A1 -B1" in HP-UX

cat syslog.*.gz | gzip -d - | sed -n -e '/regexp/{=;x;1!p;g;$!N;p;D;}' -e h

The cat syslog.*.gz | gzip -d - can also be replaced by using this command: gzcat < syslog.*.gz

HP-UX: kthread: table is full

If you ever encounter this error in dmesg or syslog.log
[root abc12]home/root # dmesg | tail
kthread: table is full
kthread: table is full
kthread: table is full
kthread: table is full
kthread: table is full
kthread: table is full
kthread: table is full
kthread: table is full
kthread: table is full
kthread: table is full
[root abc12]home/root #
[root abc12]home/root # cat /var/adm/syslog/syslog.log | grep kthread
Aug 9 21:37:12 abc12 vmunix: kthread: table is full
Aug 9 21:37:14 abc12 vmunix: kthread: table is full
Aug 10 14:07:18 abc12 vmunix: kthread: table is full
Aug 10 14:07:20 abc12 vmunix: kthread: table is full
[root abc12]home/root #

Parameter             Current Dyn Planned                    Module     Version
maxusers 200 - 200

[root abc12]home/root #

*2nd option tu nampak cam terrer la sikit

If you wanna choose a less-headache version, use SAM. Don't know how to use SAM? Eat yourself.

read more...

Removing blank lines using grep

When you have something like this:
[root abcux]/tmp # cat lines.txt
line 1

line 3

line 4




line 9


line 10

#line 12


#line 15
line 16

[root abcux]/tmp #


but you want to exclude the blank lines and line starting with "#", do this...

read more...

Thursday, August 9, 2007

UNIX God

Interesting story! Must read!!

Wednesday, August 8, 2007

Command History

Linux (BASH):
1. At the terminal, press CTRL+r and type in your command to search, i.e. vi (thanks yoe)

HP-UX (POSIX):
1. At the terminal, press ESC or > arrow and press k for up or j for down.
2. You can search your command history by pressing ESC key and / followed by your command and press ENTER.

Geddit?

Monday, August 6, 2007

HP-UX Stuffs

1. List installed HP-UX patches
swlist -l product 'PH??_*'

2. ioscan command hang/slow.
Check for zombie processes of ioscan, try to kill 'em (if you know how to kill a ghost), or kill PPID (make sure PPID != 1 !!)

Thursday, August 2, 2007

New toy

Wednesday, August 1, 2007

Human Stupidity

I rest my case.

File name completion in HP-UX

Since HP-UX using POSIX shell, the file name completion is different than Linux's.

To do a file name completion, simply press ESC and =
Example:
[ux]home/saya $ cd .s<ESC>=
1) .sh_history
2) .ssh/
[ux]home/saya $ cd .s


It will list down possible filename/directory available in the pwd. Note that a directory will have trailing char "/"

Pathname Shell
shBourne shell
cshC shell
tcshTC shell
kshKorn shell
bashBourne Again SHell


--- Update 22 August 2007
Boleh jugak wat camnih (ESC twice):
[ux]home/saya$ cat abc<ESC><ESC>
[ux]home/saya$ cat abcdef.txt
saya suka makan nasik
[ux]home/saya$

read more...

SSH weirdness

Since this is my first time encounter this type of SSH error, so it was weird.

abc123 % ssh def456
Secure connection to def456 refused; reverting to insecure method.
Using rsh. WARNING: Connection will not be encrypted.
Password:


I was like, wtf?

read more...