with Tags:
perl
X

All posts
- Sort by:
- Date
- Title
- Likes
- Comments ▼
- Views
AIX/VIO: Tracing Virtual SCSI / Shared Storage Pool Disks on AIX to VIO resources (and a script to automate this)
This article covers how to look at an existing AIX server and trace back Virtual SCSI disks back to VIO and find out what the VIO backing device is for any given AIX Virtual SCSI disk. This works for both traditional Virtual SCSI disks and also Virtual SCSI disks that are presented through a Shared Storage Pool. This article includes both information on how to do this manually as well as a script that can automate this task and trace all of your Virtual SCSI disks back to the VIO resources in an automated... [More]
Tags:  vscsi perl aix ssp vio powervm |
Script to calculate Virtual Processor to Core Ratio on POWER
The last two weeks there have been excellent presentations by Rosa Davidson about Virtual Processors on the AIX Virtual Users group. If you haven't seen these, check them out at https://www.ibm.com/developerworks/mydeveloperworks/wikis/home?lang=en#/wiki/Power%20Systems/page/AIX%20Virtual%20User%20Group%20-%20USA One of the things Rosa covered in the presentation was making sure you understand your ratio of Virtual Processors to Cores on the entire frame and understanding the ratio of Entitled CPU to Virtual Processor on each LPAR. I think... [More]
Tags:  script aix performance powervm perl |
Don't let your AIX passwords expire
AIX doesn't make it easy to see when the last time a user changed their password was or the date that their password will expire. Password expirations can cause all kinds of issues and they always seem to expire at the worst possible time (and usually in the middle of the night). Below is a script that will list passwords expirations sorted by which accounts will expire next. Passwords that have already expired show up as red, passwords expiring in the next 2 weeks show up as yellow, and passwords that are at least 2 weeks away from... [More]
Tags:  perl aix user |
Script to free up PP's across all hdisks in an AIX volume group
I'm a big fan of using AIX Scalable volume groups due to the fact that they are easy to use and have very few limitations. In my opinion, every volume group you create should be Scalable unless you have some kind of requirement to import the volume group in to a super old version of AIX. Unfortunately there are a lot of "Original" and "Big" volume groups out there. For more information about limitations of Original and Big volume groups, and a script to show you a report on your systems... [More]
Tags:  perl aix lvm |
Deciphering AIX Volume Group limitations and types
Modern versions of AIX have three types of Volume Groups: Original, Big, and Scalable.
In my opinion, for any new volume groups you are creating you should always use scalable unless you will have the need to export the volume group and import it on very old versions of AIX. Scalable volume groups have very few limitations when compared to big and original volume groups. Unfortunately there are a ton of original and big volume groups out there in the world, and it can be very tricky to understand their limitations. The main... [More]
Tags:  lvm perl volumegroup storage aix |
Report on your AIX users
Below is a script that will generate a detailed report of users on a AIX server. It provides the following features/benefits: Report is in a CSV format that can be easily viewed/filtered in a spreadsheet application such as Execl/OpenOffice/LibreOffice. Report contains information not easily viewable from AIX such as: If user has a password set or not Date of last password change Human readable dates for last login time and last failed login First column is the server name. This allows you to run the script on
multiple servers (using... [More]
Tags:  aix users perl |
Script to show recent Error Report (errpt) entries on AIX
Update 10/24/13: See also Version 2 of script to show recent Error Report entries on AIX Here is a script that will show you recent Error Report (errpt) entries on AIX. As an argument to the script you specify the number of minutes you want to go back, and the script will only show errpt entries that have occurred within that many minutes from now. This can be helpful as a standalone utility, or as part of a monitoring script that would automatically notify... [More]
Tags:  scripting script errpt aix perl |
The best scripting/programming langauge for UNIX/Linux SysAdmins
There are so many options out there for scripting and programming languages. As a UNIX/Linux SysAdmin which is best for you? In my opinion, this is a very simple answer. As a System Admin, you should be looking for the "lowest common denominator". What I mean by that is the scripting language that will be most likely to be available to you on any system you happen to log in to, be in AIX, Red Hat, Solaris, etc. It's kind of like the "vi" editor versus "emacs". If... [More]
Tags:  perl scripting unix aix linux |
Updated script - Don't let your AIX passwords expire
Here is an updated script from an old blog post I did on not letting your AIX passwords expire . This updated script now also handles user accounts with maxage set to 0 (no password expiration). Here is the updated script: #!/usr/bin/perl use strict; use POSIX qw(ceil); use User::pwent; use Term::ANSIColor; my ($user,%userids); while ($user = getpwent()){ my $u = $user->name;... [More]
Tags:  aix script password security perl |
Make sure all your LV's are mirrored in a AIX volume group
AIX makes it super easy to mirror a volume group initially (i.e. mirrorvg). Unfortunately it is somewhat difficult to keep everything mirrored after the initial setup. For example, when new filesystems are added they will not be mirrored automatically. To check to see if a LV is mirrored, you need to check that a couple of conditions are met. In the "lsvg -l volumegroup " output you will see a column labeled "PVs". In a mirrored LV this will always be at least 2. However, it is possible that PVs will be 2 or... [More]
Tags:  perl script lvm aix |
VIO VSCSI hdisk Mapping - save the headache and map them the easy way.
One of the drawbacks of using VIO VSCSI to map SAN LUN's to LPAR's is the time it takes to map the disks through on the VIO servers. The LUN's must be created on the SAN and allocated to the VIO server. On the VIO server you must then map each hdisk to the LPAR. If you are using dual VIO servers it is even worse, not only must you map the LUN through on both VIO servers, but there is a good chance that the hdisk and vhost devices are numbered differently on each VIO server so the mapping commands could be different on each VIO server. ... [More]
Tags:  perl vio vscsi aix script powervm |
Version 2 of script to show recent Error Report entries on AIX
This is an update to my previous post on a Script to show recent Error Report (errpt) entries on AIX Anthony and Dan had some good suggestions such as being able to specify the interval to go back in days instead of just minutes, and also having an option to just have the script show error report entries since the last time the script was run. So below is version two of this script. The changes are: You can specify the interval to show error report entries in by either specifying a number by... [More]
Tags:  perl errpt aix script |
Find that long lost AIX SMIT menu you can't seem to get back to
SMIT is one of the nicest features of AIX. It provides an extremely easy to use interface to manage almost every aspect of an AIX system. One of the only problems with SMIT is that it is so inclusive and complete that the menu system is huge and it can be hard to find things in the menu. There have been times where I was in SMIT and found a really useful menu, but then the next time I went to use that same menu I couldn't find it again! I started playing around with the idea of writing a script to read the ODM and display a... [More]
Tags:  odm perl smit aix |
Script to visualize the AIX Logical Volume Manager
Earlier in the week I posted a preview of a script I have been working on to visualize the AIX Logical Volume Manager. I have posted the script to generate the LVM diagram to a sourceforge site: GraphLVM For more details and to download the script, check out the sourceforge site. The script uses the open source Graphviz application. For more information on Graphviz, including a script to diagram VIO/LPAR NPIV mappings, check out this developerWorks article: Using Graphviz to generate automated system diagrams
Tags:  lvm perl script aix |
VIO Virtual SCSI disk Mapping - update
This is a small update to my previous posting on mapping Virtual SCSI disks easily via a script. As input to the script you give it the LPAR name, the label for the mapping, and the LUN serial number, and the script will find the VIO servers, figure out which vhost adapter on each VIO matches up to the LPAR, and find the correct hdisk to map based on the serial number on each VIO server. The script just prints out the command that needs to be run to map each LUN (it doesn't map anything itself), and then you can copy and paste the command... [More]
Tags:  aix perl vio vscsi |