# du -sk /opt/* | sort +0nr | head -5
25456556 /opt/data
12634192 /opt/read
5483564 /opt/download
196104 /opt/scripts
132964 /opt/freeware
tip.. if you want to include the hidden files and directories, try this.
# du -sk .[a-z]* * | sort +0nr | head -5
Tuesday, May 28, 2013
How to list the top 5 largest directories
Labels:
AIX,
LinuxAdmin,
SolarisAdmin
Wednesday, May 22, 2013
How to un-mount a volume forcefully
If you ever want to unmount a volume forcefully when the system does not allow, you need to find out who is holding on to the resource, terminate it and then unmount. This is very important to prevent data loss.
Who is holding on to the volume
# lsof | grep "/opt/download"
# fuser -cu /opt/data/System.log
Now terminate them
# kill -9
The PID will be determined from the fuser or lsof command above.
Now unmount the volume peacefully
# umount /opt/download
If you disregard who's active and want to unmount right away,
# fuser -km /opt/download
In case, you want to unmount a NFS volume that is unreachable, try this.
# umount -f /opt/download
Done...
Labels:
AIX
Tuesday, May 21, 2013
How to retrieve the list of failed logins in AIX
short and sharp.
# /usr/sbin/acct/fwtmp < /etc/security/failedlogin | more
Labels:
AIX
Thursday, May 16, 2013
How to modify permission for queue on MS MQ
Recently, a request was made to modify the permission on a queue on MS MQ. Has been administering IBM Websphere MQ so this one is new to me.
Failed attempt
Open up Computer Management console, navigated to the queues under services and application, right click to the security properties and started tweaking.
Ops. System says "Access to Message Queuing System is denied" that essential mean i do not have the rights. Probably administrator account was not used to create the queues? So how?
Found the solution!
Turn out that i just need to click "Advanced" from the security tab, then go to the owner tab, take over control using administrator account, apply and ok. Going back to assign permission to the queue now is OK.
Done. :D
Labels:
MQ
Subscribe to:
Posts (Atom)