Skip to content
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 #663

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rajendra-dendukuri
Copy link
Contributor

- 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.

            Stack trace of thread 90:
            #0  0x00007f69d80cb303 epoll_wait (libc.so.6)
            #1  0x00007f69d9076ef8 n/a (/usr/lib/x86_64-linux-gnu/libswsscommon.so.0.0.0)

root@sonic:/home/admin#

-->

@rajendra-dendukuri
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant