DEV Community

goatmale
goatmale

Posted on

Three things from today - 8/28

8/28

Another day in the life.

I want to get into the habit of sharing with the community so i'm starting a week-daily post where I share three(ish) things i've learned or found interesting while I nurse my afternoon tea.

1. Kubernetes.Academy

Source: Coworker
Why I like it: This launched recently and seems like a great way to get started with Kubernetes. Between Octant and this, they seem to be killing it at VMWare.

2. Csysdig tool

Source: Csysdig blog post I stumbled on.
I have been using the standard Sysdig command line tool to capture traces for the other engineers to review however today I just discovered the interactive ncurses interface that you can use with csysdig.
You can easily use F2 to jump over to containers and then F6 to dig as you normally would, but now there are a ton of other things to play around with.

Also, pretty colors:
Pretty colors

3. "Negative" subprocess error codes in Python.

Source: This Stackoverflow page I found while troubleshooting an issue.

Often times I troubleshoot exit codes as a means to determine why something failed. Today's issue was with a Python exit code of -11. Hidden in the comments it's written that these negative return codes correspond to the typical Linux signals. This is specifically when using the Python subprocess module, nevertheless handy to note these signals for troubleshooting.

Signal    Name    Description
SIGHUP    1    Hangup (POSIX)
SIGINT    2    Terminal interrupt (ANSI)
SIGQUIT    3    Terminal quit (POSIX)
SIGILL    4    Illegal instruction (ANSI)
SIGTRAP    5    Trace trap (POSIX)
SIGIOT    6    IOT Trap (4.2 BSD)
SIGBUS    7    BUS error (4.2 BSD)
SIGFPE    8    Floating point exception (ANSI)
SIGKILL    9    Kill(can't be caught or ignored) (POSIX)
SIGUSR1    10    User defined signal 1 (POSIX)
SIGSEGV    11    Invalid memory segment access (ANSI)
SIGUSR2    12    User defined signal 2 (POSIX)
SIGPIPE    13    Write on a pipe with no reader, Broken pipe (POSIX)
SIGALRM    14    Alarm clock (POSIX)
SIGTERM    15    Termination (ANSI)
SIGSTKFLT    16    Stack fault
SIGCHLD    17    Child process has stopped or exited, changed (POSIX)
SIGCONTv    18    Continue executing, if stopped (POSIX)
SIGSTOP    19    Stop executing(can't be caught or ignored) (POSIX)
SIGTSTP    20    Terminal stop signal (POSIX)
SIGTTIN    21    Background process trying to read, from TTY (POSIX)
SIGTTOU    22    Background process trying to write, to TTY (POSIX)
SIGURG    23    Urgent condition on socket (4.2 BSD)
SIGXCPU    24    CPU limit exceeded (4.2 BSD)
SIGXFSZ    25    File size limit exceeded (4.2 BSD)
SIGVTALRM    26    Virtual alarm clock (4.2 BSD)
SIGPROF    27    Profiling alarm clock (4.2 BSD)
SIGWINCH    28    Window size change (4.3 BSD, Sun)
SIGIO    29    I/O now possible (4.2 BSD)
SIGPWR    30    Power failure restart (System V)
Enter fullscreen mode Exit fullscreen mode
4. Bonus! - Kubectl describe pod

This is kind of silly, but I figured out that I don't need to type the full pod name when using "describe pod" it seems to glob the name :D

Doesn't work.

kubectl get pod kubernetes-dashboard
Error from server (NotFound): pods "kubernetes-dashboard" not found

Enter fullscreen mode Exit fullscreen mode

Works!

Name:               kubernetes-dashboard-7947fffdf5-f9vz5
Namespace:          kube-system
Enter fullscreen mode Exit fullscreen mode

Top comments (2)

Collapse
 
codemouse92 profile image
Jason C. McDonald

Hey, please consider using the #devjournal tag, which we're trying to start for this purpose precisely.

Collapse
 
goatmale profile image
goatmale

Roger that!