This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# the issue is siimple misconfigurations of gdm3 | |
# the solution is to reinstall it, or better yet - switch to lightdm: | |
sudo apt remove gdm3 && dpkg-reconfigure lightdm | |
# | |
# or reinstall gdm3, it is up to you. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done | sort -k 2 -n -r | less |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cat > /etc/systemd/wifi-resume.service | |
[Unit] | |
Description=Restart networkmanager at resume | |
After=suspend.target | |
After=hibernate.target | |
After=hybrid-sleep.target | |
[Service] | |
Type=oneshot | |
ExecStart=/bin/systemctl restart network-manager.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cp /etc/wpa_supplicant/ifupdown.sh /etc/ifplugd/action.d/ifupdown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT temp *9/5+32 | |
FROM | |
(SELECT median("temperature") AS "temp" FROM "weather" WHERE $timeFilter GROUP BY time(5m)), | |
(SELECT median("mean_temperature") AS "temp" FROM "year"."weather" WHERE $timeFilter GROUP BY time(1h)) | |
GROUP BY "source" fill(null) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> CREATE RETENTION POLICY two_days on weather duration 2d replication 1 default | |
> CREATE RETENTION POLICY year on weather duration 52w replication 1 | |
> create continuous query cq_30m on weather BEGIN SELECT mean(*) into year.:MEASUREMENT from two_days./.*/ group by time(30m),* EN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bpftrace -e 'kprobe:swap_read*,kprobe:swap_write* {@[comm, pid] = count();} interval:s:5{ time(); print(@); clear(@); }' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# see https://github.com/iovisor/bpftrace/blob/master/docs/tutorial_one_liners.md | |
# histogram for udp_recvmsg timing | |
sudo bpftrace -e 'kprobe:udp_recvmsg { @start[tid] = nsecs; } kretprobe:udp_recvmsg /@start[tid]/ { @ns[comm] = hist(nsecs - @start[tid]); delete(@start[tid]); }' | |
# histogram for retval of udp_recvmsg (which is message size in bytes) | |
sudo bpftrace -e 'kretprobe:udp_recvmsg { @bytes[comm] = hist(retval); }' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for proc in /proc/*; do cat $proc/smaps 2>/dev/null | awk -v proc="${proc}" '/Swap/{swap+=$2/1024}END{if (swap>1) { "readlink "proc"/exe"|getline c; print int(swap+0.5), "\tMB\t", c }}'; done | sort -n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat ~/.kube/config | grep client-certificate | sed -e ‘s/ client-certificate-data: //’ | base64 -d | openssl x509 -in - -noout -text |