- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: favorite sysadmin scripts you always keep arou...
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
Discussions
Discussions
Forums
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
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
тАО05-12-2003 05:30 AM
тАО05-12-2003 05:30 AM
Re: favorite sysadmin scripts you always keep around (3)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-12-2003 05:37 AM
тАО05-12-2003 05:37 AM
Re: favorite sysadmin scripts you always keep around (3)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-12-2003 06:05 AM
тАО05-12-2003 06:05 AM
Re: favorite sysadmin scripts you always keep around (3)
The script -> create_mnts
-----------
#!/bin/ksh
cd /
echo "Creating the required mount points..."
cat /etc/checklist |grep -v "^#"|awk '{print $2}'| while read dir_name
do
if [ ! -d ${dir_name:="/etc"} ]
then
umask 022;mkdir -p $dir_name
echo "Directory $dir_name created..."
fi
done
echo "Creating the required symbolic links..."
cat /etc/checklist |grep "symbolic link" | while read link_entry
do
sdir=`echo $link_entry|cut -d" " -f2`
ddir=`echo $link_entry|cut -d" " -f3`
ddir1=`dirname $ddir`
ddir2=`basename $ddir`
umask_val=`echo $link_entry|cut -d" " -f8`
umask $umask_val
mkdir -p $ddir1
cd $ddir1
ln -s $sdir $ddir2
echo "Created link $ddir -> $sdir "
umask 022
done
---------------------------------------
Sample fstab attached
--------------------
In our lab, at times, the systtem load increases due to some runaway processes...
Here is a one-liner to catch hold of them.. I call it 'runproc'
#!/bin/ksh
ps -elf|grep " R "|grep -v -E 'grep|ps'
-----------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-12-2003 06:56 AM
тАО05-12-2003 06:56 AM
Re: favorite sysadmin scripts you always keep around (3)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-12-2003 07:02 AM
тАО05-12-2003 07:02 AM
Re: favorite sysadmin scripts you always keep around (3)
When invoked, the CE can attach a number of files and send to a number of email addresses.
The call to MOTD has a privacy message for our protection, so you can be calling your own or comment this out.
The $MAILX_FILE is an executable that simply performs the mailx command and send out the attachments.
Have fun.
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-12-2003 07:51 AM
тАО05-12-2003 07:51 AM
Re: favorite sysadmin scripts you always keep around (3)
#!/usr/bin/sh
# scroll
# Don't ask.
typeset -i x=0
strg_len=`echo "$*" | wc -m`
#clear
delay ()
{
base=0
time=$1
while (( time > base ))
do
(( time = time - 1 ))
delays[x]="Delay?"
done
unset delays[*]
}
while (( x < $strg_len )) && (( $strg_len < 1024 ))
do
(( x = x + 1 ))
scroll[x]=`echo "$*" |cut -c $x`
[ ${scroll[x]} ] 2> /dev/null && {
print "${scroll[x]}\c"
delay 2000
} || {
print "${scroll[x]}\c"
delay 5000
}
done
tput cud1
Good for a laugh!
-ChaZ-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-12-2003 12:33 PM
тАО05-12-2003 12:33 PM
Re: favorite sysadmin scripts you always keep around (3)
I have a few more.
check_rootlogin
It reports on bad root login attempts. I use it in cron. It can be set to auto disable the id, but I didn't think that was a very good idea.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-12-2003 12:35 PM
тАО05-12-2003 12:35 PM
Re: favorite sysadmin scripts you always keep around (3)
Provides sysadmin with a list of new large files created in size order.
This is a production script.
BTW, I did check my back posts for dups.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2003 04:54 AM
тАО05-21-2003 04:54 AM
Re: favorite sysadmin scripts you always keep around (3)
/opt/OpenSource/xcdroast-0.98
You may need to edit some of the paths in the script for your own use - but on my system it works very well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-13-2003 02:09 AM
тАО06-13-2003 02:09 AM
Re: favorite sysadmin scripts you always keep around (3)
( Unix Power Tools, 2nd Edition: Examples )
ftp://ftp.oreilly.com/published/oreilly/power_tools/unix/upt9707.tgz
Regards,
Karthik