Skip to content

Instantly share code, notes, and snippets.

2017-08-08 09:50:52: netdata INFO : Adjusted my Out-Of-Memory score to '1000'.
2017-08-08 09:50:52: netdata ERROR: Cannot adjust netdata scheduling policy to idle (5), with priority 0. Falling back to nice (errno 38, Function not implemented)
2017-08-08 09:50:52: netdata INFO : netdata started on pid 1.
2017-08-08 09:50:52: netdata INFO : Registry is disabled - use the central netdata
2017-08-08 09:50:52: netdata ERROR: HEALTH [Domain.xx]: cannot open health file: /var/lib/netdata/health/health-log.db.old (errno 2, No such file or directory)
2017-08-08 09:50:52: netdata ERROR: HEALTH [Domain.xx]: cannot open health file: /var/lib/netdata/health/health-log.db (errno 2, No such file or directory)
2017-08-08 09:50:52: netdata INFO : Host 'Domain.xx' (at registry as 'Domain.xx') with guid '1107d056-7c1f-11e7-8b7a-001e67ec746a' initialized, os linux, tags '', update every 1, memory mode ram, history entries 3996, streaming enabled (to '--master-ip--:19999' with api key '3a9757fe-5308-40c0-98b1-0a3d1b16b62e'), heal
@vahit
vahit / i3lock_photo.sh
Created August 14, 2017 04:27
Take a photo with webcam if someone insert the wrong passwd -- For i3lock (you need fswebcam!)
echo " " > /tmp/i3lock_log.txt ##clear log
_date()
{
date=`grep 'pam_unix(i3lock:auth): authentication failure' /tmp/i3lock_log.txt | awk {'print $3'} | tail -n 1`
}
_date
pht="0"
@vahit
vahit / gist:3f42e9dd2b7cd40f2537621745332970
Created October 24, 2017 21:24
backlight controller in Archlinux
#!/usr/sbin/env bash
set -exuo pipefail
# Backlight controller
# IMPORTANT!!
# YOU MUST RUN THESE TWO COMMANDS AFTER EVERY REBOOT SINCE I FIND A PROPER SOLUTION.
# # chown root:user sys/class/backlight/intel_backlight/max_brightness
# # chmod 664 sys/class/backlight/intel_backlight/max_brightness
Dec 18 02:20:02 |Dl| ###################### 22 MB/s
|Ul| ######################################## 40 MB/s
Dec 18 02:40:01 |Dl| ################################################# 49 MB/s
|Ul| ################################## 34 MB/s
Dec 18 03:00:01 |Dl| ############################################################### 63 MB/s
|Ul| ################################################# 49 MB/s
Dec 18 03:20:01 |Dl| ####################### 23 MB/s
|Ul| #################### 20 MB/s
Dec 18 03:40:01 |Dl| ###################################################################################### 86 MB/s
|Ul| ########################################################## 58 MB/s