- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- favorite sysadmin scripts you always keep around [...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2003 07:00 AM
03-19-2003 07:00 AM
Re: favorite sysadmin scripts you always keep around [2]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2003 07:10 AM
03-19-2003 07:10 AM
Re: favorite sysadmin scripts you always keep around [2]
I keep two text files: users.txt and groups.txt. The Makefile turns these two lists into both a sendmail alias list and a userdb DBM file that sendmail also uses. Then it pushes those files out to all the mail hubs in the network.
OK looks like just one attachment, so I'll post the Makefile directly here:
SRCS=users.txt groups.txt
DB=userdb.txt
install: aliases userdb.db
./push_alias
aliases: ${SRCS}
mv $@ $@.old
sed "s/:/:mailname/" users.txt > ${DB}
cat ${SRCS} >> $@
chmod 644 $@
userdb.db: ${DB}
mv $@ $@.old
/usr/sbin/makemap btree $@ < ${DB}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2003 07:13 AM
03-19-2003 07:13 AM
Re: favorite sysadmin scripts you always keep around [2]
Sample users.txt:
user1: user@realmail.net
user2: user2@realmail.net
user3: user3@othermail.com
groups.txt:
all_users: user1, user2, user3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2003 02:35 PM
03-19-2003 02:35 PM
Re: favorite sysadmin scripts you always keep around [2]
You will have to modify the awk command to properly identify the disk ID to be monitored and the systemID (both between "<" and ">".
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2003 03:10 PM
03-19-2003 03:10 PM
Re: favorite sysadmin scripts you always keep around [2]
psg : searches for process that contains the search string (similar to psg script listed earlier in this thread).
Usage : psg search_string
qstat : lists the status of a single print queue along with the status of any print jobs
Usage : qstat queue_name
ugsessions : Checks FlexLM license server and tells me how many users are running UG as well as when the each session started. Session are sorted by workstation name. Remove the "-k2,2" from the sort command to sort by user ID. This should work with any package using FlexLM licensing since the function uses the "lmutil lmstat" command (I've tested it with UG, Patran, Abaqus, & Vericut).
Usage : ugsessions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2003 12:45 AM
03-20-2003 12:45 AM
Re: favorite sysadmin scripts you always keep around [2]
this script gets some good details of the server like cpu binary, CPU Model, No. of cpus, Memory , etc.
radhakrishnan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2003 10:19 AM
03-20-2003 10:19 AM
Re: favorite sysadmin scripts you always keep around [2]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2003 10:26 AM
03-20-2003 10:26 AM
Re: favorite sysadmin scripts you always keep around [2]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2003 05:32 AM
03-21-2003 05:32 AM
Re: favorite sysadmin scripts you always keep around [2]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2003 08:41 AM
03-21-2003 08:41 AM
Re: favorite sysadmin scripts you always keep around [2]
Please change location of wherever needed.
This script was useful when we wanted to automate kernel backup and email result on completion. And we have put this script in cron.
In this script, it emails to backup_notif which is aliases for sys admins and backup operators.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2003 06:44 AM
03-24-2003 06:44 AM
Re: favorite sysadmin scripts you always keep around [2]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2003 07:21 AM
03-25-2003 07:21 AM
Re: favorite sysadmin scripts you always keep around [2]
telnet
don't forget to background the telnet call bcos you are calling the alias.
- ramd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2003 11:27 AM
03-25-2003 11:27 AM
Re: favorite sysadmin scripts you always keep around [2]
Attached are utilities for a DLT40 autochanger, using mc and mt cmds to move tapes between drives, slots, mailslot, etc.
TAPELIB_MOVE - basic movement of cartridges
TAPELIB_1ST_SLOT - find first full/empty slot in range setup by user
TAPELIB_NEXT_SLOT - find next full/empty slot in range setup by user
TAPELIB_SLOT_ROTATE - advance cartridges forward to next empty slot; e.g., slot 2 to 1, 3 to 2, etc. - in range specified by user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2003 12:04 PM
03-25-2003 12:04 PM
Re: favorite sysadmin scripts you always keep around [2]
It requires source & target LUNS, plus mapfile. Here are contents of mapfile:
# cat /etc/lvmconf/vgora_bc.mapfile
1 lvoracopy
2 lvoraficopy
#
It creates device files, vgimport, link to PV's, mounts fs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2003 03:46 PM
03-28-2003 03:46 PM
Re: favorite sysadmin scripts you always keep around [2]
This script I use to get lan interface info. It can be improved by adding speed and duplex queries. It shows device names including virtual lans, ip address, LLA(MAC) address in octet colon notation and primary hostname as found in /etc/hosts.
It has been tested on hp9000/700-800 servers running hpux 10.20, 11.00 and 11.11
Enjoy,
-Ted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2003 01:58 PM
04-29-2003 01:58 PM
Re: favorite sysadmin scripts you always keep around [2]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2003 06:02 AM
04-30-2003 06:02 AM
Re: favorite sysadmin scripts you always keep around [2]
usage: terr ENOENT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2003 06:18 AM
04-30-2003 06:18 AM
Re: favorite sysadmin scripts you always keep around [2]
script to find total no. of files opened by each currently running process and gives out a sorted list thereof.
- ramd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2003 06:30 AM
04-30-2003 06:30 AM
Re: favorite sysadmin scripts you always keep around [2]
=
= NOTICE:
=
===========
seeing as this thread is getting large,
please post any scripts to the continuation of this thread:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xf0fc5dc05a7ad711abdc0090277a778c,00.html
THANK YOU!
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2003 06:31 AM
04-30-2003 06:31 AM
Re: favorite sysadmin scripts you always keep around [2]
I have one for it.
Note:
1.you must make sure first in your sitting server (from where you run this script) that you do not have "/" or "\" and "$" character in your pssword field.
2. you must be able to ro remsh as a root to all your 100 server.
3. change password in sitting server and run the script.
Big Note: don't try to run it on all your server without testing or else you will not be able to login to any server.
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2003 06:35 AM
04-30-2003 06:35 AM
Re: favorite sysadmin scripts you always keep around [2]
I forget to mention that after I had a trouble initially I have put option that will allow you to see change password entry. If you think it is not right you can always skip update on that particular system and keep going.
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2003 06:38 AM
04-30-2003 06:38 AM
Re: favorite sysadmin scripts you always keep around [2]
=
= NOTICE:
=
===========
seeing as this thread is getting large,
please post any scripts to the continuation of this thread:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xf0fc5dc05a7ad711abdc0090277a778c,00.html
THANK YOU!
Bill
No points will be awarded here soon!
only here:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xf0fc5dc05a7ad711abdc0090277a778c,00.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2003 07:03 AM
04-30-2003 07:03 AM
Re: favorite sysadmin scripts you always keep around [2]
Alternate paths are displayed in a only line:
/dev/vg_oracle /dev/dsk/c30t0d5 /dev/dsk/c27t0d5
/dev/vg_oracle /dev/dsk/c27t1d5 /dev/dsk/c30t1d5
/dev/vg00 /dev/dsk/c1t2d0
/dev/vg00 /dev/dsk/c2t2d0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2003 07:21 AM
04-30-2003 07:21 AM
Re: favorite sysadmin scripts you always keep around [2]
=
= NOTICE:
=
===========
seeing as this thread is getting large,
please post any scripts to the continuation of this thread:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xf0fc5dc05a7ad711abdc0090277a778c,00.html
THANK YOU!
Bill
No points will be awarded here soon!
only here:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xf0fc5dc05a7ad711abdc0090277a778c,00.html
==========
=
= EOF!
=
===========
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2003 08:41 AM
07-22-2003 08:41 AM
Re: favorite sysadmin scripts you always keep around [2]
Here's an example of running the script...
# getchmod /etc/inetd.conf
0644 -rw-r--r-- file root:sys /etc/inetd.conf
And yes, it will use wildcards...
I've named the script getchmod....
jack...