Пример #1
0
import os
import sys

try:
    if "PYTHON_LIB" in os.environ:
        additional_lib = os.environ["PYTHON_LIB"]
        python_path_list = additional_lib.split(':')
        for python_path in python_path_list:
            python_lib = python_path
            if python_lib not in sys.path:
                sys.path.insert(0, python_lib)
except Exception as e:
    print('Error: ' + str(e))


"""

help = '''
Dump character device list example code
'''

rprog("dump_chrdevs", "Char device list",
      "-h   - list available options",
      help)


help = '''
Dump block device list example code
'''

rprog("dump_blkdevs", "Block device list",
Пример #2
0
"""
 Written by Daniel Sungju Kwon
"""

from crash import register_epython_prog as rprog

from pykdump.API import *
"""

help = '''
Dump character device list example code
'''

rprog("dump_chrdevs", "Char device list",
      "-h   - list available options",
      help)


help = '''
Dump block device list example code
'''

rprog("dump_blkdevs", "Block device list",
      "-h   - list available options",
      help)

"""

help = '''
vmware's ballooning value check
'''
Пример #3
0
    prints a summary of connections and warnings about unusual situations

-iv
    prints information about interfaces

-a
    prints information about connections. You can use extra specifiers
    similar to 'netstat' command, e.g. choose TCP only by adding -t

--everything
    prints most things, useful for sending the output to someone with
    networking expertise
'''

rprog("xportshow",
      "Networking stuff",
      "-h   - list available options",
      help)


help = '''
The detailed documentation is available on the WEB. Here are most useful
options:

-q
    Run quietly printing WARNINGS if anything

-v
    Increase verbosity

--stacksummary
    print a categorized stack summary
Пример #4
0
"""
 Written by Amit Das
 Reference : https://sungju.wordpress.com/2020/09/09/how-to-write-mpykdump-extension/
 Step : Add following file in the ~/.crashrc
	# epython /<home-path>/mypycrash
"""

from crash import register_epython_prog as rprog

help = '''
Show kernel boot options
'''

rprog("commandline", "show commandline", "-h - list available options", help)

help = '''
SELinux status
'''

rprog("selinuxinfo", "show selinux status", "-h     list available options",
      help)