Archives Posts
December 31st, 2009 by elizar
Veritas Volume Manager VxVM Basics Commands Cheats.. The authority site for this topic, the VXVM on VXFS, if you do a Google search for any tutorial or command cheat sheet is Cuddletech.
I want to post… say, borrowing, the content of that page to this post for my own personal reference… Love your own page right? And since I am more likely to open SysadminPH that cuddletech, I thought we not copy the Veritas tutorial page here for my ease of access?
Read the rest of this entry »
Archives Posts
December 3rd, 2009 by elizar
SVM: Determine Free Space on Soft Partition , we use the metastat -c command…
[root@localhost] /work/users> metastat -c d103
d103 p 32GB d100
d100 m 68GB d101 d102
d101 s 68GB c1t2d0s0
d102 s 68GB c1t3d0s0
[root@localhost] /work/users> metastat -p d103
d103 -p d100 -o 32 -b 58720256 -o 127926432 -b 8388608
d100 -m d101 d102 1
d101 1 1 c1t2d0s0
d102 1 1 c1t3d0s0
So from the first metastat -c d103.. that’s a mirrored 68G partition, d100 and a 32G soft partition d103.. We still have around 35G of space.
update: — someone comment please.. this information is incomplete!
Archives Posts
July 1st, 2009 by elizar
Another quikie copy/paste kind of thingy…
You may set your search path automatically each time you log in, by placing the appropriate “set path” command in your “.login” file.
(To learn more about the .login file, type “help dotlogin”.) Here is a sample of a command line that you might put in your .login file to set a non-standard search path:
set path = ( $path /usr/ucb /bin /usr/bin /usr/new .)
Archives Posts
June 24th, 2009 by elizar
Top equivalent for AIX – Topas, Only Better… That’s what I searched when I got a ticket from one of the AIX boxes here complaining about CPU being 99% used up.
Of course, you can use vmstat with interval, but for those sysadmin folks who are use to using Top, its still more comfortable using (and seeing) the top output.
Topas is the equivalent of Top for AIX.. it’s better than Top as a matter of fact according to some AIX gurus (and Solaris)
If you persists in using top, You’ll have to build it yourself from the sources at http://www.unixtop.org/ plus probably this fix:
http://sourceforge.net/tracker/index.php?func=detail&aid=934590&group_id=72892&atid=536044
Good luck!
Archives Posts
March 10th, 2009 by elizar
Do Not Prompt Password for SUDO: NoPasswd, here’s a quikie, quikie post… How do you setup a sudo for a user without prompting the user for his password?
RTFM!
Simply add NOPASSWD before the list of commands…again NOPASSWD goes before the list of commands, after your username and host list. The man page has this example:
ray rushmore = NOPASSWD: /bin/kill, /bin/ls, /usr/bin/lprm
Where ‘ray’ is the username, ‘rushmor’ is the host and the rest, you know already….
Archives Posts
January 24th, 2009 by elizar
pwd is probably the most widely used UNIX (or Unix-like) command! ls (el-es) could also be the most used but we will be talking about pwd here, so let’s say that ‘pwd’ is the most widely used shall we?
What is pwd?
pwd, when executed at the shell (prompt) will print out the current working directory in the standard output of the system, which is the monitor.
pwd could be and abbreviation for ‘print working directory’ or ‘present working directory’ or make up your own definition.. there’s no rule.
WIkipedia says:
In Unix-like and some other operating systems the pwd command (print working directory) is used to output the path of the current working directory.
The command is a shell builtin in certain Unix shells such as sh, and bash. It can be implemented easily with the POSIX C functions getcwd() and/or getwd().
The equivalent on DOS (COMMAND.COM) and Microsoft Windows (cmd.exe) is the “cd” command with no arguments. Windows PowerShell provides the equivalent “Get-Location” cmdlet with the standard aliases “gl” and “pwd”. The OpenVMS equivalent is “show default”.
Example:
$ pwd
/home/foobar
Archives Posts
January 16th, 2009 by elizar
This one is about Solaris Volume Manager and all those meta commands you can think of.. (metadb, metadettach, metattach, metaclear etc)…
Yesterday we had to replace a failed disk that belongs to a mirror. The disk is running in a Sparc Solaris 10 box. It’s a 72GB from Fujitsu
c1t1d0 Soft Errors: 440 Hard Errors: 12 Transport Errors: 124
Vendor: FUJITSU Product: MAY2073RCSUN72G Revision: 0501 Serial No: 0711S0935R
Size: 73.40GB <73400057856 bytes>
As you can see from the iostat -En command, the disk is spitting hard errors and must be replaced before it can cause a lot more headache. It’s in c1t1, right.
Here’s what we’re supposed to do:
- we could delete the meta data base that corresponds to the failed disk
- detached the failed disk/slices to the mirror
- clear it
- unconfigure the disk
- replace the disk
- configure the disk
- create new meta device database
- Initialize the disk
- Attached it to mirror
- and sync
Here’s the detailed job:
Read the rest of this entry »
Archives Posts
September 18th, 2008 by elizar
Here’s what we did today on one of our Solaris box that is worth mentioning on this cool super system administrator’s blog ‘o mine! (Don’t you find it cool that SysAds are so funny?!)
Anyhoo, today we re-jumpstarted a laboratory box because the ‘owner’ of it wants it back. Since we pretty much messed it up, I have to jumpstarted a fresh copy.
After installing returned the original /etc/shadow and /etc/passwd back from backup (had a backup file on the laptop).. but unfortunately, the /etc/shadow file is ‘null’.
Restoring File From UFSdump Backup
Here’s the procedure in restoring a particular file from ufs dump backup… Of course if you’re restoring from ufs backup you probably made a ufs backup in the first place, right? Right!
In this example, the files backup.examples and junk are restored from the pubs directory:
Read the rest of this entry »
Archives Posts
June 6th, 2008 by elizar
The last post, was used to chmod a list of home directory.
I used another application for that ‘for..do’ loop again… it’s climbing my favorite script command list..
second only to ‘while…do’..
for X in `ls -last | grep 2006 | awk ‘{print $9}’`
do
rm -rf $x
done
bye bye 2006 directories!
Archives Posts
November 20th, 2007 by elizar
/proc is a pseudo-filesystem used to access process information from the kernel. It doesn’t use any storage space and uses little memory. On Linux, you can sometimes make modifications to the running kernel by modifying “files” in /proc.
If / is full, run a command similar to the following to sort all files in the / file system by size:
find / -xdev -ls | sort -n -k 7
“-xdev” limits the find command to the root file system.
This will only look for files found in the root and will not includes those partitions that are defined in /etc/vfstab | /etc/fstab file, those listed when `df -k` is executed:
/dev/md/dsk/d0 2058319 1016097 980473 51% /
/dev/md/dsk/d3 2058319 1801793 194777 91% /var
etc .. etc..
Thanks Brandon!
Brandon H. – Senior UNIX Systems Engineer for an application services provider in Minneapolis, MN.