These Tips are mainly for my Sun Solaris compatriots out there. Linux, sadly, seems to have been on the cutting edge when it comes to desktop usefulness. Although I love my Solaris, and would not trade my E4500 for a Beowulf linux cluster, on the desktop...it's a different story.
Now don't get me wrong, I have had Solaris desktops for almost a decade now, I've had Irix and Linux, but my workhorse has always been a Sun Sparc. SparcStations, UltraSparcs, love 'em all. They are what I call home. However, I've often found myself looking a bit lustfully at a linux desktop wondering how long it will be until some of those features are added to my beloved Solaris.
But, enough blathering. All that was set-up for this, my Tips & Tricks. They are almost always going to be based on Solaris. Sure some will work on any *NIX OS, but some will seems silly for Linux users, or impossible for the users of other OSs.
All Introductions aside I bring you.......
Daily Tip for May 13, 2006
Who can contain the power of the Sun?# zonecfg -z Citrix Citrix: No such zone configured Use 'create' to begin configuring a new zone. zonecfg:Citrix> create -t SUNWlx zonecfg:Citrix> set zonepath=/export/zones/Citrix_root zonecfg:Citrix> add net zonecfg:Citrix:net> set address=192.168.0.20/24 zonecfg:Citrix:net> set physical=iprb0 zonecfg:Citrix:net> end zonecfg:Citrix> add attr zonecfg:Citrix:attr> set name="audio" zonecfg:Citrix:attr> set type=boolean zonecfg:Citrix:attr> set value=true zonecfg:Citrix:attr> end zonecfg:Citrix> commit zonecfg:Citrix> exit
# zoneadm -z Citrix install -d /export/home/jc209962/centos_fs_image.tar Installing zone 'Citrix' at root directory '/export/zones/Citrix_root' from archive '/export/home/jc209962/centos_fs_image.tar' This process may take several minutes. Setting up the initial lx brand environment. System configuration modifications complete. Setting up the initial lx brand environment. System configuration modifications complete. Installation of zone 'Citrix' completed successfully. Details saved to log file: "/export/zones/Citrix_root/root/var/log/Citrix.install.2139.log"
# zoneadm list -iv ID NAME STATUS PATH BRAND IP 0 global running / native shared - Citrix installed /export/zones/Citrix_root lx shared
# zoneadm -z Citrix boot # zoneadm list -iv ID NAME STATUS PATH BRAND IP 0 global running / native shared 1 Citrix running /export/zones/Citrix_root lx shared # # zlogin Citrix [Connected to zone 'Citrix' pts/5] Welcome to your shiny new Linux zone. - The root password is 'root'. Please change it immediately. - To enable networking goodness, see /etc/sysconfig/network.example. - This message is in /etc/motd. Feel free to change it. For anything more complicated, see: http://opensolaris.org/os/community/brandz/ You have mail. -bash-2.05b# uname -a Linux Citrix 2.4.21 BrandZ fake linux i686 i686 i386 GNU/Linux
Daily Tip for February 5, 2006
Killing XSun softly with Alt+Del...killing it softlykeycode 83 = Delete
xmodmap -e "keycode 83 = Delete Delete Terminate_Server"
Daily Tip for January 11, 2006
smpatch for fun and profit!# /usr/bin/updatemanager &
# /usr/sbin/sconadm register -a -r /tmp/registration.txtIf you don't have a SUN subscription key or contract number, you can still register the system without one just leave that field empty.
# /usr/sbin/smpatch update
# /usr/sbin/smpatch analyze
# /usr/sbin/smpatch download [-i patch-id] [-x patch-idlist-file]
# /usr/sbin/smpatch add [-i patch-id] [-x patch-idlist-file]
# /usr/sbin/smpatch remove [-i patch-id] [-x patch-idlist-file]
Daily Tip for January 10, 2006
lsof free port discovery# ps -ef | grep ssh root 279 1 0 22:23:24 ? 0:00 /usr/lib/ssh/sshd #Nothing too interesting, but this is just an example...So I wonder what port ssh is running on? I already know the process id, now I just need to see what resource this process is using.
# pfiles 279 | grep port sockname: AF_INET6 :: port: 22Now, as you can see I used grep to narrow the results to what I was looking for. In this case it was the port number. Now, how would you do that when you don't know the process? Easy you write a script that takes all the running process id's, runs them through pfiles, and prints out the id of the port you were looking for
Daily Tip for January 9, 2006
prstat or look whose not top dog anymore![me@localhost]: # prstat PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP 1181 me 4832K 4544K cpu0 59 0 0:00:00 0.2% prstat/1 91 root 4056K 3000K sleep 59 0 0:00:30 0.0% nscd/27 387 root 127M 27M sleep 59 0 0:03:00 0.0% Xsun/1 442 root 11M 7544K sleep 59 0 0:02:44 0.0% dtgreet/1 725 me 8584K 2632K sleep 59 0 0:00:02 0.0% sshd/1 424 root 3640K 1896K sleep 59 0 0:01:45 0.0% nmbd/1 1 root 2216K 792K sleep 59 0 0:00:03 0.0% init/1 Total: 47 processes, 151 lwps, load averages: 0.00, 0.00, 0.00
Daily Tip for January 8, 2006
-h or Human Readable Format[me@localhost]:/home/me # df -k . Filesystem kbytes used avail capacity Mounted on /dev/dsk/c0t0d0s7 5037950 2617145 2370426 53% /export/home
[me@localhost]:/home/me # df -h . Filesystem size used avail capacity Mounted on /dev/dsk/c0t0d0s7 4.8G 2.5G 2.3G 53% /export/homeOf course it would. That's why Sun has finally gotten around to adding that into our beloved Solaris's built in commands. Give it a try next time your looking for big files, or trying to calculate your space requirements. It's in most of the commands that can be used to display sizes (du, df, ls, etc..).