Posts about Linux
-
Building 32-bit PHP on 64-bit Fedora
-
Trash Directory for Partition
If you have a separate user writable drive mounted, you may have encountered the same problem I had. If your DE cannot create
.Trash-$uid
, most DEs will not delete files to the trash at all and KDE will copy deleted files to your home partition. I find both behaviors frustrating.The solution is rather simple: look at the spec and create the trash directory manually.
# for example, your drive is mounted to /media/external # go to the drive root cd /media/external # create root owned .Trash sudo mkdir .Trash # make it world writable with a sticky bit sudo chmod 1777 .Trash
Now delete some file from that partition and check that is lands to
.Trash/$uid/files
. Your trash directory now works properly. -
RPM5 Lost All Distros
With OpenMandriva Lx 4 now in beta it seems that RPM5 lost all its main users. CAOS, Ark and Unity are discontinued, Wind River and OpenMandriva switched to RPMv4
Interestingly, it's also the end of urpmi with both Mageia and OpenMandriva switching to dnf.
It seems rpm world entered a semi-unified state with dnf and zypper, both libsolv based and partly interoperable
-
What Is Dead May Never Die
Let's have some fun with the Drowned God and Unix signals.
This is a simple program that catches
SIGINT
andSIGTERM
-
systemd in Zabbix
If you use Zabbix to monitor your servers you may want to monitor systemd services with it especially if you have some custom services.
These simple checks were enough for me:
systemd.unit.is-active[<unit name>] # 1 if unit is active, 0 if inactive systemd.unit.is-failed[<unit name>] # 1 if unit if in failed state, 0 if not systemd.unit.is-enabled[<unit name>] # 1 if unit is enabled, 0 if not
It's very simple. Just place
userparameter_systemd.conf
to your zabbix config dir (usually/etc/zabbix_agentd.conf.d
) with the following content:# checks to determine if specified unit is active, failed or enabled UserParameter=systemd.unit.is-active[*],systemctl is-active --quiet '$1' && echo 1 || echo 0 UserParameter=systemd.unit.is-failed[*],systemctl is-failed --quiet '$1' && echo 1 || echo 0 UserParameter=systemd.unit.is-enabled[*],systemctl is-enabled --quiet '$1' && echo 1 || echo 0