- 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
08-19-2003 07:34 AM
08-19-2003 07:34 AM
Re: favorite sysadmin scripts you always keep around [2]
Here is the usage...
vxfs_defrag,sh [ -html ] [ -m ] [ -p ] [ -f ] [ -s ]
-html Create report using HTML output. -m is redundant
-m Mail report to
-p Preview Mode. All functions are run, but files are not removed.
-f Force Mode. No prompts will be displayed. Script will answer yes to all prompts
-s Silent Mode. No messages to screen - No prompts (Force mode)
NOTE: All flags must be listed separately.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2003 11:15 AM
08-19-2003 11:15 AM
Re: favorite sysadmin scripts you always keep around [2]
groups >0 and creates a script to create the structure on another system. It is useful for cloning machines, DR, etc. This script works on HP-UX 10.20-11i machines and has been tested in Perl 5 as well as Perl 4.
It works great for the default lvol1, lvol2, lvol3 cases, and is not designed for non-standard lvol names, so you may have to modify the script for that.
Output looks something like this:
#!/bin/sh
# Create logical volume script for hostnamehere
# Created on: Tue Aug 19 13:55:21 CDT 2003
/sbin/lvcreate -l 387 -r n /dev/vg01 # /dev/vg01/lvol1
/sbin/lvcreate -l 1024 -r n /dev/vg01 # /dev/vg01/lvol2
/sbin/lvcreate -l 1024 -r n /dev/vg01 # /dev/vg01/lvol3
/sbin/lvcreate -l 1024 -r n /dev/vg01 # /dev/vg01/lvol4
/sbin/lvcreate -l 1274 -r n /dev/vg01 # /dev/vg01/lvol5
/sbin/lvcreate -l 1024 -r n /dev/vg01 # /dev/vg01/lvol6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2003 02:36 AM
08-25-2003 02:36 AM
Re: favorite sysadmin scripts you always keep around [2]
first 'cd' to the desired directory and then enter :
compress `find . |grep -v '.Z'`
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2003 12:17 AM
09-10-2003 12:17 AM
Re: favorite sysadmin scripts you always keep around [2]
Although i am using this forum a lot, this is my first time to join...
Everytime we create FS and LVs, we need to check first the free space of our VGs right? That's why i created this script. This give me an idea how much is the free space on each VGs. Hope this help :)
BTW, could anyone send me a script that will help me simplify my jobs in Symmetrix & BCV? Appreciate so much if you guys can send it over. Thank you so much!
script start here
--->
#!/usr/bin/ksh
#
#
VG_LIST=/tmp/vg_list.$$
vgdisplay | grep "/dev" | awk '{print $3}' > $VG_LIST
for i in `cat $VG_LIST`
do
VG_ALLOC=`vgdisplay $i|awk -v var=$i '/PE Size/ {PES=$NF} /Total PE/ {TPE=$NF} END{print "ALLOCATED SPACE for",var,vg=PES*TPE,"Mb"}'`
echo "$VG_ALLOC\c"
VG_USED=`vgdisplay $i|awk -v var1=$i '/PE Size/ {PES=$NF} /Alloc PE/ {APE=$NF} END{ print "\tUSED SPACE ",vg=APE*PES,"Mb"}'`
echo "$VG_USED\c"
VG_FREE=`vgdHi Bill,
Although i am using this forum a lot, this is my first time to join...
Everytime i need to create FS and LVs, we need to check first the free space of our VGs right? That's why i created this script. This give me an idea how much is the free space on each VGs. Hope this help :)
script start here
--->
#!/usr/bin/ksh
#
#
VG_LIST=/tmp/vg_list.$$
vgdisplay | grep "/dev" | awk '{print $3}' > $VG_LIST
for i in `cat $VG_LIST`
do
VG_ALLOC=`vgdisplay $i|awk -v var=$i '/PE Size/ {PES=$NF} /Total PE/ {TPE=$NF} END{print "ALLOCATED SPACE for",var,vg=PES*TPE,"Mb"}'`
echo "$VG_ALLOC\c"
VG_USED=`vgdisplay $i|awk -v var1=$i '/PE Size/ {PES=$NF} /Alloc PE/ {APE=$NF} END{ print "\tUSED SPACE ",vg=APE*PES,"Mb"}'`
echo "$VG_USED\c"
VG_FREE=`vgdisplay $i|awk -v var=$i '/PE Size/ {PES=$NF} /Free PE/ {FPE=$NF} END{ print "\tFREE SPACE ",vg=FPE*PES,"Mb"}'`
echo "$VG_FREE"
done
exit 0
sample output
--->
ALLOCATED SPACE for /dev/vg00 34712 Mb USED SPACE 28472 Mb FREE SPACE 6240 Mb
ALLOCATED SPACE for /dev/appl 20568 Mb USED SPACE 18672 Mb FREE SPACE 1896 Mb
isplay $i|awk -v var=$i '/PE Size/ {PES=$NF} /Free PE/ {FPE=$NF} END{ print "\tFREE SPACE ",vg=FPE*PES,"Mb"}'`
echo "$VG_FREE"
done
exit 0
sample output
--->
ALLOCATED SPACE for /dev/vg00 34712 Mb USED SPACE 28472 Mb FREE SPACE 6240 Mb
ALLOCATED SPACE for /dev/appl 20568 Mb USED SPACE 18672 Mb FREE SPACE 1896 Mb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2003 11:12 PM
09-10-2003 11:12 PM
Re: favorite sysadmin scripts you always keep around [2]
Yehey i earned 10 points!!!!!
This forum is really great.
BTW, i have here a script that will disable the password aging feature after you convert your box into 'Trusted System'. Basically we have more than 800 users and there are some users that should have the feature of password aging such as oracle, informix id....
First, i list those IDs that should be exempted on password aging and put it into a file. Then just execute this script.
# ./passwd_aging_disable.sh
Usage: ./passwd_aging_disable.sh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2003 03:38 AM
11-07-2003 03:38 AM
Re: favorite sysadmin scripts you always keep around [2]
It runs once a day and tells us, if if a disk died.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2004 12:46 PM
01-29-2004 12:46 PM
Re: favorite sysadmin scripts you always keep around [2]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2004 12:43 AM
01-30-2004 12:43 AM
Re: favorite sysadmin scripts you always keep around [2]
# SYNTAX: timecalc HH:MM HH:MM
# Output: hours minutes
# Example: timecalc 14:10 14:35
# gives: 0 25
#
# timecalc 23:45 01:30
# gives: 1 45
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2005 07:27 AM
01-24-2005 07:27 AM
Re: favorite sysadmin scripts you always keep around [2]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2005 08:49 PM
12-27-2005 08:49 PM
Re: favorite sysadmin scripts you always keep around [2]
This script checks all PVs,VGs and LVs availability,free PEs,available spaces and so on. It wrotes the output to a log file named as system date. And mails the output to the user.
it is not a system specific.
i hope it will be usefull for you.
Note:if you have any idea that can be added for the daily checks for a unix system, please inform me.
Regards,
Onur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2005 11:20 PM
12-27-2005 11:20 PM
Re: favorite sysadmin scripts you always keep around [2]
Here is a script for monitoring filesystem.
With 2 tresholds.
grtz. Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2005 05:21 PM
12-29-2005 05:21 PM
Re: favorite sysadmin scripts you always keep around [2]
This script checks for total number of filesystems and filesystem percentages. If anyone is over limit that you will assign, mails the admin with over limited filesystem.
Regards,
Onur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2006 09:59 PM
02-21-2006 09:59 PM
Re: favorite sysadmin scripts you always keep around [2]
small script about processes from users hard disconnection
E.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2006 02:16 AM
02-22-2006 02:16 AM
Re: favorite sysadmin scripts you always keep around [2]
just a "ksh" debugged revision of a previous script which select fields in a file for any purpose
Pablo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2006 03:01 AM
05-26-2006 03:01 AM
Re: favorite sysadmin scripts you always keep around [2]
# noc.sh -b ls /usr/bin
111111111122222222223333333...
123456789012345678901234567890123456...
====================================...
X11 dts_null_provider...
acl_edit dtscp
adb dtsd
adb64 du
adjust dumpfs
admin dumpmsg
alias e
answer echo
ar ed
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2006 03:57 AM
05-26-2006 03:57 AM
Re: favorite sysadmin scripts you always keep around [2]
Will send an email listing those jobs older that specified time so you are aware
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2006 11:14 PM
06-08-2006 11:14 PM
Re: favorite sysadmin scripts you always keep around [2]
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=51050
- « Previous
- Next »