-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added 'config core' and 'show cores' CLI commands #1278
base: master
Are you sure you want to change the base?
Added 'config core' and 'show cores' CLI commands #1278
Conversation
Signed-off-by: Rajendra Dendukuri <[email protected]>
This pull request introduces 1 alert when merging 4e1755d into 6fabbed - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are in the process of splitting groups out into their own files and importing them in the main.py files, for better organization and smaller files. Can you please move these new groups and their commands into show/cores.py and config/cores.py? (I also suggest aligning the groups to both be plural).
Signed-off-by: Rajendra Dendukuri <[email protected]>
Renamed the commands to "coredump" to be inline with kdump. Also split them out into separate files config/coredump.py and show/coredump.py. |
This pull request introduces 1 alert when merging d3459d7 into 04dd841 - view on LGTM.com new alerts:
|
Signed-off-by: Rajendra Dendukuri <[email protected]>
This PR requires sonic-net/sonic-buildimage#6079 |
Signed-off-by: Rajendra Dendukuri [email protected]
- What I did
Added wrapper CLI commands to see core files information. Also added CLI command to enable/disable
corefile generation.
- How I did it
Added new commands
config core
show cores
- How to verify it
show cores list
config core enable
config core disable
- Previous command output (if the output of a command-line utility has changed)
- New command output (if the output of a command-line utility has changed)
root@sonic:/home/admin# show cores
Usage: show cores [OPTIONS] COMMAND [ARGS]...
Show core dump events encountered
Options:
-?, -h, --help Show this message and exit.
Commands:
config Show coredump configuration
info Show information about one or more coredumps
list List available coredumps
root@sonic:/home/admin# show cores list
TIME PID UID GID SIG COREFILE EXE
Sat 2016-12-31 22:46:22 UTC 4933 0 0 6 present /usr/bin/vlanmgrd
root@sonic:/home/admin# show cores info
PID: 4933 (vlanmgrd)
UID: 0 (root)
GID: 0 (root)
Signal: 6 (ABRT)
Timestamp: Sat 2016-12-31 22:46:22 UTC (6min ago)
Command Line: /usr/bin/vlanmgrd
Executable: /usr/bin/vlanmgrd
Control Group: /docker/38e40a3313bd46ff4e282f897cdc25502a2b15febe9839715f92b035b6f2cffe
Slice: -.slice
Boot ID: 3f776b83fa704d089bd81e0b108c2a09
Machine ID: a0c0523aae8c4c21a8d9fa12e18d85b0
Hostname: sonic
Storage: /var/lib/systemd/coredump/core.vlanmgrd.0.3f776b83fa704d089bd81e0b108c2a09.4933.1483224382000000000000.lz4
Message: Process 4933 (vlanmgrd) of user 0 dumped core.