October 8, 2010 at 11:09 am
· Filed under Linux, tips
So your system is acting screwy and you are tying to figure out what is going wrong. Listing the processes in order to determine who the CPU or memory hogs are.
List how much CPU percent and time each process is uing
ps -e -o pcpu,cpu,nice,state,cputime,args –sort pcpu | sed ‘/^ 0.0 /d’
In order to list the process with how much memory each process is using, listed from lease to most memory hogs.
ps -e -orss=,args= | sort -b -k1,1n | pr -TW$COLUMNS
Permalink
July 1, 2008 at 10:26 am
· Filed under Solaris, tips
Why is this soo cool? Because the default way to upgrade the OBP is to have a running system. But some times
If you have a working jump start enviroment most of the work is already done, yaha. You actully dont even have to use a solaris box to act as the upgrade server any tftp server will do.
So basically what I did here is used a already set up jump start server to upgrade the OBP on a Sun Fire v240. I deleted the link to the solaris kernel and created a symlink from the mac address to the upgrade binary.
bash-3.00# pwd
/tftpboot
bash-3.00# ls -l
total 458
lrwxrwxrwx 1 root root 27 Jun 6 11:40 0A2483F9 -> inetboot.SUN4U.Solaris_10-1
lrwxrwxrwx 1 root root 27 Jun 6 11:40 0A2483F9.SUN4U -> inetboot.SUN4U.Solaris_10-1
-rwxr-xr-x 1 root root 217016 Jun 6 11:40 inetboot.SUN4U.Solaris_10-1
drwxr-xr-x 2 root root 512 Jun 5 12:07 ODBUpgrade
-rw-r–r– 1 root root 321 Jun 6 11:40 rm.10.36.131.249
lrwxrwxrwx 1 root root 1 Jun 5 10:23 tftpboot -> .
bash-3.00# ls -l ODBUpgrade/
total 7888
-rw-r–r– 1 root root 1482292 Jun 5 12:07 flash-update-Blade100
-rw-r–r– 1 root root 2534420 Jun 5 12:07 flash-update-SunFire240
Permalink
December 5, 2007 at 9:34 am
· Filed under tips
Deleting file that have special characters in them can be tricky. This is what you have to do to delete them.
because rm -r -file will give you a error
[root@solaris:/]# rm -C
rm: illegal option — C
usage: rm [-fiRr] file …
so what you have to do is search figure out what the inode is
[root@solaris:/]# ls -il -C
total 2723130
32081 -rw-r–r– 1 root root 1392916480 Dec 4 14:55 -C
the 32081 is the inode number
[root@solaris:/u10/app 102]# find . -inum 32081 -exec rm -i {} \;
rm: remove ./-C (yes/no)? y
now the file is gone, yaha!
Permalink