AIX page 1 of 1 for 8 posts

I have about 50 HP JetDirect print queues on an AIX system that I wanted to remove in a more automated way. The following KSH script is what I came up with to remove the device and queue. The script attempts to ping the print queue (queues are added by DNS name). If the ping fails, I remove the device using rmqueudev and then remove the queue using rmque. #!/bin/ksh for i in $(lpstat | awk '{print $1}') do ping -c 1 -w 1 $i >/dev/null 2>&1 if [ $? -ge 1 ]; then echo "Purging Continue Reading...

Get Process ID of an Established TCP Connection in AIX

There are numerous ways to accomplish getting the PID for an established network connection in AIX and Linux using tools like ss or more popular lsof.  In my situation, the system I was working on did not have ss or lsof, so I used netstat and rmsock.
If I know I have an established connection to a remote host 192.168.9.150, I can use netstat to narrow down and obtain the PCB/ADDR using the following command.
~ # netstat -naA|grep 192.168.9.150
f10000f3026fcb58 tcp4       0      0  10.147.204.10.40107 Continue Reading...

Test Dial on Modem in AIX

Had an issue with dialout on an AIX system this morning.  Problem resolved, but I learned a pretty handy little command for testing dial-out (I didn't have a buttset with me).
Using cu -n -d -l tty2, I can dial-out to my cellphone to help in troubleshooting the problem.
# cu -n -d -l tty2
Please enter the number: xxxxxxxxxx
altconn called
Device Type ACU wanted
ttylock tty2 succeeded
Attempting to open /dev/tty2
clear O_NDELAY
filelock: ok
fixline(7, 19200)
gdial(fcmulhays) called
expect: ("")
got Continue Reading...

Backspace in terminal on AIX

Instead of using Shift+Backspace to backspace on an AIX terminal, you can use the following setting in the .profile:

stty erase '^?'

Save the file and logout and back into the AIX terminal and Backspace should work now.

Monitor System Performance in AIX

An easy way to get a quick overview of system performance on an AIX server is to use the topas command.
Continue Reading...

FastClaims for Tiger in AIX

So I've discovered that FastClaims in Allscripts Tiger AIX servers are stored in the following location. When a receipts are batched, they are stored in /m2/MF01/CLAIM499 When clicking on "Batch" -> Fast Claims, it then copies /m2/MF01/CLAIM499 to /src/APPS/ECONNECT/ARCHIVE/TS/CLAIM499_1.3101165443_20120131165507385. You will notice this filename is comprised of CLAIM499_[companynumber].ddmmhhmmss.yyyymmddhhmmssnnnn in gzip format. The original /m2/MF01/CLAIM499 is renamed to /m2/MF01/oldCLAIM499. The Continue Reading...

Get serial number of AIX

Get the serial number of an AIX system.

#!/bin/ksh
#
# Get serial number of AIX server;
#
# October 28, 2009 Rich Kreider
#
ser_num=`lsattr -El sys0 -a systemid | awk '{print $2}' | awk -F, '{print $2}'`
prefix=`echo ${ser_num} | cut -c3-4`
suffix=`echo ${ser_num} | cut -c5-9`
echo ${prefix}-${suffix}

AIX/Unix Common Commands

AIX/Unix Commands
free - lists available disk space
dfdb - lists dbspaces on the system. use ifxksh to initialize the ifx environment first
who -b - displays last date system was rebooted
oslevel - lists the version of the operating system
bootinfo -r - lists total amount of real memory installed (divide by 1024 to get MB)
startjs - starts the job server
stopjs - stops the job server
startvlink - starts any interface link procedure incling Misys Vision/Optimum Charge Daemon
stopvlink - Continue Reading...