-
Notifications
You must be signed in to change notification settings - Fork 3
/
reniced.conf
104 lines (79 loc) · 1.97 KB
/
reniced.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# format:
# command perl_regular_expression
# This is a non-standard reniced.conf. It's not run with reniced but
# as root with:
## perl -0777 -pe 's[sub generate_ps_command.*?\{.*?\n\}][sub generate_ps_command { "ps H -eo lwp,cmd" }]s;' < /usr/bin/reniced | /usr/bin/perl
# and to get debug output:
## perl -0777 -pe 's[sub generate_ps_command.*?\{.*?\n\}][sub generate_ps_command { "ps H -eo lwp,cmd" }]s;' < /usr/bin/reniced | /usr/bin/perl - -v
# This allows us to match against the full command + argument list,
# not just the command name.
# Helper commands for editing this file:
## Get a list of processes/nice levels:
### ps -eo "%n %p %y %x %c %a" | perl -pe 's[\d\s+\K(\d+)(?= )][chomp(my $ret = qx{ionice -p $1}); qq{ $1 <$ret> }]e'
## Get a list of things that haven't been ioniced'd:
### ps -eo "%n %p %y %x %c %a" | perl -pe 's[\d\s+\K(\d+)(?= )][chomp(my $ret = qx{ionice -p $1}); qq{ $1 <$ret> }]e' | grep '<none: prio 0>'
## Run reniced and see what happens:
### sudo /usr/bin/reniced
### Interactive user processes
-10 emacs
-10 irssi
-10 bash
-10 screen
-10 tmux
-5 sshd
-5 htop
-5 top
### Interactive foreground services
# Don't bring us down on IO-intensive hash checks
1i ^rtorrent
2i ^unrar
### Non-interactive background services
9b5 ntpd
10b6 (?<!r)tor(?!rent)
11b6 dbus-daemon --system
15b5 bitcoind
15b5 java
# Mailman
9b6 (?:mailmanctl|qrunner)
### Interactive network services
# Misc services
1b1 acpid
1b1 dbus-daemon
1b1 cron
1b1 redis-server
1b1 mdadm
1b1 haveged
1b1 dockerd
1b1 containerd
1b1 snapd
1b1 libvirtd
# Web services:
1b1 vlogger.*access log
1b1 php5-cgi
1b1 fastcgi\.pl$
1b1 memcached
1b1 mysqld
# Mail services:
2b2 ^(?:master|smtpd|anvil|pickup|qmgrx|qmgr)
2b2 qpsmtpd
# DNS:
1b1 pdns_(?:server|recursor)
# IM:
1b1 bitlbee
# VPN
1b1 openvpn
# IRC/Telegram bots
## The teleircd
3b3 node
3b3 failo
3b3 hailo
3b3 pocoirc
# We only use these for cron-type stuff
5b5 postgres
5b5 fail2ban
# identd
2b2 oidentd
# udevd
2b2 udevd
# syslog
2b2 rsyslogd