Categories
SysOps

How to manage system services on Debian Jessie

Debian Jessie is using systemd as the default system and service manager. I will not argue about it, but instead, I will briefly introduce the whole thing.

Categories
SysOps

How to pretty-print disk space used by PostgreSQL databases

I wrote a simple shell script to pretty-print disk space used by PostgreSQL databases while examining database object size functions. You can benefit from this too by inspecting used SQL statements.

Categories
SysOps

How to terminate active ssh sessions

Several months ago I have shortly described how to close a non-responsive ssh session, which comes in handy at times. Today I will describe how to close every active ssh session by inspecting existing pseudoterminals.

Categories
SysOps

How to pretty-print system uptime

It is easy to use uptime command, but custom shell script is definitely a more interesting solution as it provides more detailed information.

Categories
SysOps

How to verify installed packages

I have unexpectedly experienced an issue with a couple of broken packages, which was easily solved using debsums utility.

Categories
SysOps

How to automatically logout user from the login shell after period of inactivity

I want to automatically log out the user from the login shell after a defined period of inactivity but leave X Window Terminals untouched. This will allow me to enhance security slightly, as I will not accidentally leave the superuser session running for a long time.

Categories
SysOps

How to find orphaned files

It is easy to overlook orphaned files without an assigned existing owner or group after moving large amounts of data. Fortunately, it is easy to spot these files using the find utility.

Categories
SysOps

How to store last command from history

I often want to save a recently executed command to the personal log file for further reference, so let’s do it.