- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- shell script for kernel parameters
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
тАО06-06-2006 10:40 AM
тАО06-06-2006 10:40 AM
I want to capture the below mentioned current configured kernel parameters in a file:-
maxfiles
nfile
maxusers
nproc
max_thread_proc
ncallout
nkthread
Can someone suggest a shell script ?
Thanks,
Shiv
Solved! Go to Solution.
- Tags:
- kernel parms
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2006 11:37 AM
тАО06-06-2006 11:37 AM
SolutionI'm going to assume 11.11 and point you to 'kmtune'. You could do something like this:
# cat ./myparms
#!/usr/bin/sh
typeset MYLOG=/tmp/kparms.log
date >> ${MYLOG}
echo "" >> ${MYLOG}
for P in maxfiles nfile maxusers nproc max_thread_proc ncallout nkthread
do
kmtune -l -q ${P} >> ${MYLOG}
done
echo ".end." >> ${MYLOG}
...simply run as :
# ./myparms
See the manpages for more information:
http://www.docs.hp.com/en/B2355-60127/kmtune.1M.html
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2006 01:39 PM
тАО06-06-2006 01:39 PM
Re: shell script for kernel parameters
from man kmtune description in 11.23:
=====================================
kmtune is an obsolete command that is replaced by kctune(1M). Users
are encouraged to migrate to kctune(1M). kmtune will be removed in a
future release of HP-UX. The behavior of some of kmtune's options have
changed and they are noted in the appropriate sections below.
=====================================
so...
# cat >myparms_11.23
#!/usr/bin/sh
typeset MYLOG=/tmp/kparms_11.23.log
date >> ${MYLOG}
echo "" >> ${MYLOG}
for P in maxfiles nfile maxusers nproc max_thread_proc ncallout nkthread
do
kctune -v ${P} >> ${MYLOG}
done
echo ".end." >> ${MYLOG}
--------
note that maxusers, ncallout not availble in 11.23. so two errors:
--------
./myparms_11.23
ERROR: There are no tunables matching the name you specified.
ERROR: There are no tunables matching the name you specified.
--------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-06-2006 02:46 PM
тАО06-06-2006 02:46 PM
Re: shell script for kernel parameters
the OS version, you can use the command you like:
kctune | grep -e maxfiles -e nfile -e maxusers -e nproc -e max_thread_proc -e ncallout -e nkthread
or
kmtune | grep -e maxfiles -e nfile -e maxusers -e nproc -e max_thread_proc -e ncallout -e nkthread
NOTE: maxusers if a fudge factor, not a real kernel parameter. It is used as part of several default formula settings.
Bill Hassell, sysadmin
- Tags:
- grep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 01:34 AM
тАО06-08-2006 01:34 AM
Re: shell script for kernel parameters
I want to capture the below mentioned current configured kernel parameters in a FILE:-
anyhow, from bill's script,
kctune | grep -e maxfiles -e nfile -e maxusers -e nproc -e max_thread_proc -e ncallout -e nkthread >/tmp/kparms_11.23.log