Results 1 to 6 of 6

Thread: Dumping UNIX Kernel Paramters

  1. #1
    Taz
    Taz is offline
    Senior Member Taz's Avatar
    Join Date
    Jan 2005
    Location
    London
    Posts
    2,117
    Thanks
    55
    Thanked
    26 times in 25 posts
    • Taz's system
      • Motherboard:
      • Gigabyte Z270 HD3P
      • CPU:
      • Intel Core i5 7600K
      • Memory:
      • Corsair CMK16GX4M2B3200C16R Vengeance LPX 16 GB
      • Storage:
      • Samsung 960 EVO M.2-2280 500GB (PCIe) + 1TB Sandisk Ultra II SSD (SATA)
      • Graphics card(s):
      • Asus NVIDIA GeForce GTX 1070 OC
      • PSU:
      • Corsair CS550M 550W Hybrid
      • Case:
      • NZXT Source 340
      • Operating System:
      • Windows 10 Pro
      • Monitor(s):
      • 34" Asus Designo Curve MX34VQ UWQHD Monitor
      • Internet:
      • Virgin Media Vivid 200

    Dumping UNIX Kernel Paramters

    I need to code a utility in Java to capture kernel paramters from a variety of different UNIX systems:

    - Solaris

    - Linux

    - HP-UX

    - AIX

    The captured data needs to be in the form:

    <parameter>=<value> in the tool that I code.

    What I need to know is what system files or Unix commands I need to run in order to get this data? I think I know a couple:

    - Solaris: 'cat /etc/system'

    - Linux (assume RedHat): 'cat /etc/sysctl.conf' ??? Not sure if this is correct.

    - HP-UX: don't know.

    - AIX: don't know. I think there is no file to dump in AIX but a system command instead???

  2. #2
    Agent of the System ikonia's Avatar
    Join Date
    May 2004
    Location
    South West UK (Bath)
    Posts
    3,736
    Thanks
    39
    Thanked
    75 times in 56 posts

    Re: Dumping UNIX Kernel Paramters

    ok,

    this is going to be very hard to do for you.

    as whats running in the config files /etc/system for example, is not really whats running in the "live" kernel at the time.

    To get the static info and the current running info would be a mixture of multiple commands, all that give you data in different formats/layouts for you to manage. for example, solaris ndd for the current network modules status, kmtune on hp-ux for current running parameters, or say, /proc/sys/kernel/threads-max on a linux box which isn't defined in sysctl.conf, and not all linux distros use sysctl.conf, or on aix, the output from smit.

    You've got a pretty aukward task there in my opion, normally these are done with system tools or damones

    (if you're using solaris 10 dtrace would work wonders for you)
    It is Inevitable.....


  3. Received thanks from:

    Taz (15-04-2008)

  4. #3
    Comfortably Numb directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,027 times in 678 posts
    • directhex's system
      • Motherboard:
      • Asus ROG Strix B550-I Gaming
      • CPU:
      • Ryzen 5900x
      • Memory:
      • 64GB G.Skill Trident Z RGB
      • Storage:
      • 2TB Seagate Firecuda 520
      • Graphics card(s):
      • EVGA GeForce RTX 3080 XC3 Ultra
      • PSU:
      • EVGA SuperNOVA 850W G3
      • Case:
      • NZXT H210i
      • Operating System:
      • Ubuntu 20.04, Windows 10
      • Monitor(s):
      • LG 34GN850
      • Internet:
      • FIOS

    Re: Dumping UNIX Kernel Paramters

    what do you mean by "kernel parameters"? if you mean "the settings given to the kernel in order to boot", try /proc/cmdline in linux

  5. #4
    Taz
    Taz is offline
    Senior Member Taz's Avatar
    Join Date
    Jan 2005
    Location
    London
    Posts
    2,117
    Thanks
    55
    Thanked
    26 times in 25 posts
    • Taz's system
      • Motherboard:
      • Gigabyte Z270 HD3P
      • CPU:
      • Intel Core i5 7600K
      • Memory:
      • Corsair CMK16GX4M2B3200C16R Vengeance LPX 16 GB
      • Storage:
      • Samsung 960 EVO M.2-2280 500GB (PCIe) + 1TB Sandisk Ultra II SSD (SATA)
      • Graphics card(s):
      • Asus NVIDIA GeForce GTX 1070 OC
      • PSU:
      • Corsair CS550M 550W Hybrid
      • Case:
      • NZXT Source 340
      • Operating System:
      • Windows 10 Pro
      • Monitor(s):
      • 34" Asus Designo Curve MX34VQ UWQHD Monitor
      • Internet:
      • Virgin Media Vivid 200

    Re: Dumping UNIX Kernel Paramters

    Quote Originally Posted by directhex View Post
    what do you mean by "kernel parameters"? if you mean "the settings given to the kernel in order to boot", try /proc/cmdline in linux
    Hi directhex, no not the settings provided to the kernel to boot. I mean things like file handles per user, semaphores, shared memory pools, etc, etc. I.e. the runtime configuration of the kernel resources.

  6. #5
    Comfortably Numb directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,027 times in 678 posts
    • directhex's system
      • Motherboard:
      • Asus ROG Strix B550-I Gaming
      • CPU:
      • Ryzen 5900x
      • Memory:
      • 64GB G.Skill Trident Z RGB
      • Storage:
      • 2TB Seagate Firecuda 520
      • Graphics card(s):
      • EVGA GeForce RTX 3080 XC3 Ultra
      • PSU:
      • EVGA SuperNOVA 850W G3
      • Case:
      • NZXT H210i
      • Operating System:
      • Ubuntu 20.04, Windows 10
      • Monitor(s):
      • LG 34GN850
      • Internet:
      • FIOS

    Re: Dumping UNIX Kernel Paramters

    Quote Originally Posted by Taz View Post
    Hi directhex, no not the settings provided to the kernel to boot. I mean things like file handles per user, semaphores, shared memory pools, etc, etc. I.e. the runtime configuration of the kernel resources.
    you want "sysctl -a" then, not "cat /etc/sysctl.conf" - the former gives the current state, the latter gives the proposed settings on boot. the two are not always the same.

    again, assuming linux. i have no access to non-linux*nixes right now to test them, sorry

  7. Received thanks from:

    Taz (15-04-2008)

  8. #6
    Taz
    Taz is offline
    Senior Member Taz's Avatar
    Join Date
    Jan 2005
    Location
    London
    Posts
    2,117
    Thanks
    55
    Thanked
    26 times in 25 posts
    • Taz's system
      • Motherboard:
      • Gigabyte Z270 HD3P
      • CPU:
      • Intel Core i5 7600K
      • Memory:
      • Corsair CMK16GX4M2B3200C16R Vengeance LPX 16 GB
      • Storage:
      • Samsung 960 EVO M.2-2280 500GB (PCIe) + 1TB Sandisk Ultra II SSD (SATA)
      • Graphics card(s):
      • Asus NVIDIA GeForce GTX 1070 OC
      • PSU:
      • Corsair CS550M 550W Hybrid
      • Case:
      • NZXT Source 340
      • Operating System:
      • Windows 10 Pro
      • Monitor(s):
      • 34" Asus Designo Curve MX34VQ UWQHD Monitor
      • Internet:
      • Virgin Media Vivid 200

    Re: Dumping UNIX Kernel Paramters

    I've found that executing 'sysdef -i' on Solaris will dump the kernel parameters. The resulting output will need a bit of parsing but should be fine for the tool I need to code.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Windows - a brief guide inside
    By Paul Adams in forum Software
    Replies: 31
    Last Post: 23-06-2007, 03:14 PM
  2. Unix SATA Issues
    By LWA in forum Software
    Replies: 6
    Last Post: 05-08-2006, 09:27 PM
  3. Replies: 1
    Last Post: 22-06-2006, 10:09 AM
  4. Replies: 7
    Last Post: 02-08-2005, 07:24 PM
  5. Linux kernel booted on Nintendo DS
    By Steve in forum HEXUS News
    Replies: 0
    Last Post: 06-05-2005, 05:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •