Linux 186-227-203-186.cprapid.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
Apache
Server IP : 186.227.203.186 & Your IP : 216.73.216.196
Domains : 154 Domain
User : pmcaxingo
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Lock Shell
Lock File++
Readme
/
usr /
sbin /
Delete
Unzip
Name
Size
Permission
Date
Action
NetworkManager
3.41
MB
-rwxr-xr-x
2025-08-26 09:47
accessdb
12.59
KB
-rwxr-xr-x
2021-10-08 13:04
addgnupghome
3
KB
-rwxr-xr-x
2018-12-11 07:44
addpart
24.86
KB
-rwxr-xr-x
2026-02-04 20:18
adduser
148.16
KB
-rwxr-xr-x
2025-12-18 13:51
agetty
62.39
KB
-rwxr-xr-x
2026-02-04 20:18
alternatives
36.66
KB
-rwxr-xr-x
2023-10-14 22:48
anacron
40.99
KB
-rwxr-xr-x
2024-04-06 11:40
apachectl
4.69
KB
-rwxr-xr-x
2026-06-10 15:42
applygnupgdefaults
2.17
KB
-rwxr-xr-x
2017-12-18 12:28
arp
64.71
KB
-rwxr-xr-x
2020-08-30 17:47
arpd
109.52
KB
-rwxr-xr-x
2024-05-23 08:36
arping
28.74
KB
-rwxr-xr-x
2023-10-14 17:19
atd
32.63
KB
-rwxr-xr-x
2022-10-10 10:23
atrun
67
B
-rwxr-xr-x
2022-10-10 10:23
auditctl
45.04
KB
-rwxr-xr-x
2025-07-15 09:41
auditd
151.73
KB
-rwxr-xr-x
2025-07-15 09:41
augenrules
4.04
KB
-rwxr-xr-x
2025-07-15 09:41
aureport
122.35
KB
-rwxr-xr-x
2025-07-15 09:41
ausearch
130.36
KB
-rwxr-xr-x
2025-07-15 09:41
autrace
16.54
KB
-rwxr-x---
2025-07-15 09:41
avcstat
16.4
KB
-rwxr-xr-x
2026-02-10 14:26
badblocks
32.59
KB
-rwxr-xr-x
2025-10-07 07:08
biosdecode
21.45
KB
-rwxr-xr-x
2024-04-06 13:04
biosdevname
46.16
KB
-rwxr-xr-x
2019-10-18 20:07
blkdeactivate
15.97
KB
-r-xr-xr-x
2026-01-23 07:31
blkdiscard
29.05
KB
-rwxr-xr-x
2026-02-04 20:18
blkid
98.66
KB
-rwxr-xr-x
2026-02-04 20:18
blkmapd
53.48
KB
-rwxr-xr-x
2026-03-09 13:08
blkzone
49.75
KB
-rwxr-xr-x
2026-02-04 20:18
blockdev
41.3
KB
-rwxr-xr-x
2026-02-04 20:18
bridge
158.25
KB
-rwxr-xr-x
2024-05-23 08:36
build-locale-archive
841.05
KB
-rwx------
2026-05-26 09:39
cagefs_enter_user
21.3
KB
-rwxr-xr-x
2026-01-20 13:58
capsh
32.45
KB
-rwxr-xr-x
2026-05-04 20:33
cfdisk
98.41
KB
-rwxr-xr-x
2026-02-04 20:18
cgdisk
206.55
KB
-rwxr-xr-x
2022-10-12 10:53
chcpu
28.83
KB
-rwxr-xr-x
2026-02-04 20:18
chgpasswd
69.69
KB
-rwxr-xr-x
2025-12-18 13:51
chkconfig
45.11
KB
-rwxr-xr-x
2023-10-14 22:48
chpasswd
61.42
KB
-rwxr-xr-x
2025-12-18 13:51
chroot
41.45
KB
-rwxr-xr-x
2026-03-24 13:05
cl-link-to-cln
3.12
KB
-rwxr-xr-x
2026-06-11 11:31
cl-post-jwt-update
3.38
KB
-rwxr-xr-x
2026-06-11 11:31
cl-pre-jwt-update
1.46
KB
-rwxr-xr-x
2026-06-11 11:31
clncheck
1.94
KB
-rwxr-xr-x
2026-06-11 11:31
clncheck-3.6
1.94
KB
-rwxr-xr-x
2026-06-11 11:31
clnreg_ks
2.3
KB
-rwxr-xr-x
2026-06-11 11:31
clock
65.22
KB
-rwxr-xr-x
2026-02-04 20:18
clockdiff
20.43
KB
-rwxr-xr-x
2023-10-14 17:19
cloudlinux-autotracing
382
B
-rwxr-xr-x
2026-05-13 14:10
cloudlinux-awp-installer
5.29
KB
-rwxr-xr-x
2026-05-12 10:09
cloudlinux-collect-panic-info
2.71
KB
-rwx------
2025-11-10 10:40
cloudlinux-config
566
B
-rwxr-xr-x
2026-05-20 17:27
cloudlinux-customizer
2.79
KB
-rwxr-xr-x
2026-05-20 18:04
cloudlinux-edition-watcher
2.3
KB
-rwxr-xr-x
2026-05-20 18:04
cloudlinux-license
566
B
-rwxr-xr-x
2026-05-20 17:27
cloudlinux-limits
566
B
-rwxr-xr-x
2026-05-20 17:27
cloudlinux-packages
566
B
-rwxr-xr-x
2026-05-20 17:27
cloudlinux-selector
654
B
-rwxr-xr-x
2026-05-12 10:09
cloudlinux-server-flags
3.67
KB
-rwxr-xr-x
2026-04-03 15:53
cloudlinux-ssa-agent
374
B
-rwxr-xr-x
2026-05-13 14:10
cloudlinux-ssa-manager
378
B
-rwxr-xr-x
2026-05-13 14:10
cloudlinux-statistics
492
B
-rwxr-xr-x
2026-05-20 17:45
cloudlinux-statistics.python
492
B
-rwxr-xr-x
2026-05-20 17:45
cloudlinux-statsnotifier
492
B
-rwxr-xr-x
2026-05-20 17:45
cloudlinux-statsnotifier.python
492
B
-rwxr-xr-x
2026-05-20 17:45
cloudlinux-summary
566
B
-rwxr-xr-x
2026-05-20 17:27
cloudlinux-top
492
B
-rwxr-xr-x
2026-05-20 17:45
cloudlinux-top.python
492
B
-rwxr-xr-x
2026-05-20 17:45
cloudlinux-wizard
863
B
-rwxr-xr-x
2026-05-20 18:04
cloudlinux-xray
807
B
-rwxr-xr-x
2026-05-12 10:09
consoletype
11.88
KB
-rwxr-xr-x
2025-11-10 10:42
convertquota
78.68
KB
-rwxr-xr-x
2021-10-09 07:08
cracklib-check
13.05
KB
-rwxr-xr-x
2019-10-12 00:47
cracklib-format
251
B
-rwxr-xr-x
2019-10-12 00:47
cracklib-packer
13.05
KB
-rwxr-xr-x
2019-10-12 00:47
cracklib-unpacker
9.03
KB
-rwxr-xr-x
2019-10-12 00:47
create-cracklib-dict
990
B
-rwxr-xr-x
2019-10-12 00:47
crond
73.94
KB
-rwxr-xr-x
2024-04-06 11:40
csf
245.1
KB
-rwx------
2025-02-28 06:11
ctrlaltdel
24.79
KB
-rwxr-xr-x
2026-02-04 20:18
ctstat
25.33
KB
-rwxr-xr-x
2024-05-23 08:36
dbgovchart
492
B
-rwxr-xr-x
2026-05-20 17:45
dbgovchart.python
492
B
-rwxr-xr-x
2026-05-20 17:45
dcb
155.04
KB
-rwxr-xr-x
2024-05-23 08:36
ddns-confgen
20.46
KB
-rwxr-xr-x
2026-06-08 03:38
debugfs
231.63
KB
-rwxr-xr-x
2025-10-07 07:08
delpart
24.86
KB
-rwxr-xr-x
2026-02-04 20:18
depmod
159.98
KB
-rwxr-xr-x
2024-04-22 16:52
devlink
215.87
KB
-rwxr-xr-x
2024-05-23 08:36
dmfilemapd
24.55
KB
-r-xr-xr-x
2026-01-23 07:31
dmidecode
141.8
KB
-rwxr-xr-x
2024-04-06 13:04
dmsetup
158.64
KB
-r-xr-xr-x
2026-01-23 07:31
dmstats
158.64
KB
-r-xr-xr-x
2026-01-23 07:31
dnssec-checkds
936
B
-rwxr-xr-x
2026-06-08 03:38
dnssec-coverage
938
B
-rwxr-xr-x
2026-06-08 03:38
dnssec-dsfromkey
60.84
KB
-rwxr-xr-x
2026-06-08 03:38
dnssec-importkey
60.84
KB
-rwxr-xr-x
2026-06-08 03:38
dnssec-keyfromlabel
64.75
KB
-rwxr-xr-x
2026-06-08 03:38
dnssec-keygen
72.84
KB
-rwxr-xr-x
2026-06-08 03:38
dnssec-keymgr
934
B
-rwxr-xr-x
2026-06-08 03:38
dnssec-revoke
56.74
KB
-rwxr-xr-x
2026-06-08 03:38
dnssec-settime
60.84
KB
-rwxr-xr-x
2026-06-08 03:38
dnssec-signzone
117.2
KB
-rwxr-xr-x
2026-06-08 03:38
dnssec-verify
52.84
KB
-rwxr-xr-x
2026-06-08 03:38
dosfsck
65.13
KB
-rwxr-xr-x
2019-10-12 00:48
dosfslabel
61.1
KB
-rwxr-xr-x
2019-10-12 00:48
dovecot
157.84
KB
-rwxr-xr-x
2026-02-03 19:40
dovecot_cpshutdown
3.27
KB
-rwxr-xr-x
2026-02-03 19:31
dpkg-fsys-usrunmess
12.11
KB
-rwxr-xr-x
2021-12-15 12:46
dumpe2fs
32.52
KB
-rwxr-xr-x
2025-10-07 07:08
e2freefrag
16.42
KB
-rwxr-xr-x
2025-10-07 07:08
e2fsck
328.52
KB
-rwxr-xr-x
2025-10-07 07:08
e2image
36.61
KB
-rwxr-xr-x
2025-10-07 07:08
e2label
110.63
KB
-rwxr-xr-x
2025-10-07 07:08
e2mmpstatus
32.52
KB
-rwxr-xr-x
2025-10-07 07:08
e2undo
20.38
KB
-rwxr-xr-x
2025-10-07 07:08
e4crypt
24.55
KB
-rwxr-xr-x
2025-10-07 07:08
e4defrag
28.49
KB
-rwxr-xr-x
2025-10-07 07:08
ebtables
220.8
KB
-rwxr-xr-x
2024-04-02 18:37
ebtables-restore
220.8
KB
-rwxr-xr-x
2024-04-02 18:37
ebtables-save
220.8
KB
-rwxr-xr-x
2024-04-02 18:37
edquota
91.24
KB
-rwxr-xr-x
2021-10-09 07:08
efibootdump
20.52
KB
-rwxr-xr-x
2021-12-21 10:17
efibootmgr
41.98
KB
-rwxr-xr-x
2021-12-21 10:17
ether-wake
73.99
KB
-rwxr-xr-x
2020-08-30 17:47
ethtool
557.79
KB
-rwxr-xr-x
2022-10-08 17:27
exicyclog
11.1
KB
-rwxr-xr-x
2026-05-29 19:00
exigrep
11.44
KB
-rwxr-xr-x
2026-05-29 19:00
exim
1.53
MB
-rwsr-xr-x
2026-05-29 19:00
exim_checkaccess
4.83
KB
-rwxr-xr-x
2026-05-29 19:00
exim_dbmbuild
24.69
KB
-rwxr-xr-x
2026-05-29 19:00
exim_dumpdb
43.56
KB
-rwxr-xr-x
2026-05-29 19:00
exim_fixdb
49.05
KB
-rwxr-xr-x
2026-05-29 19:00
exim_lock
26.59
KB
-rwxr-xr-x
2026-05-29 19:00
exim_tidydb
43.78
KB
-rwxr-xr-x
2026-05-29 19:00
eximstats
149.14
KB
-rwxr-xr-x
2026-05-29 19:00
exinext
8.03
KB
-rwxr-xr-x
2026-05-29 19:00
exiqgrep
6.58
KB
-rwxr-xr-x
2026-05-29 19:00
exiqsumm
6.29
KB
-rwxr-xr-x
2026-05-29 19:00
exiwhat
4.42
KB
-rwxr-xr-x
2026-05-29 19:00
exportfs
82.37
KB
-rwxr-xr-x
2026-03-09 13:08
faillock
20.52
KB
-rwxr-xr-x
2025-12-17 18:54
fatlabel
61.1
KB
-rwxr-xr-x
2019-10-12 00:48
fcgistarter
12.47
KB
-rwxr-xr-x
2026-06-10 15:43
fdformat
33.17
KB
-rwxr-xr-x
2026-02-04 20:18
fdisk
130.91
KB
-rwxr-xr-x
2026-02-04 20:18
filefrag
16.46
KB
-rwxr-xr-x
2025-10-07 07:08
findfs
12.38
KB
-rwxr-xr-x
2026-02-04 20:18
firewalld
6.92
KB
-rwxr-xr-x
2026-05-26 16:24
fix-info-dir
7.84
KB
-rwxr-xr-x
2022-04-18 17:09
fixfiles
10.48
KB
-rwxr-xr-x
2024-07-02 21:04
fixparts
74.91
KB
-rwxr-xr-x
2022-10-12 10:53
fsck
53.47
KB
-rwxr-xr-x
2026-02-04 20:18
fsck.cramfs
41.41
KB
-rwxr-xr-x
2026-02-04 20:18
fsck.ext2
328.52
KB
-rwxr-xr-x
2025-10-07 07:08
fsck.ext3
328.52
KB
-rwxr-xr-x
2025-10-07 07:08
fsck.ext4
328.52
KB
-rwxr-xr-x
2025-10-07 07:08
fsck.fat
65.13
KB
-rwxr-xr-x
2019-10-12 00:48
fsck.minix
98.75
KB
-rwxr-xr-x
2026-02-04 20:18
fsck.msdos
65.13
KB
-rwxr-xr-x
2019-10-12 00:48
fsck.vfat
65.13
KB
-rwxr-xr-x
2019-10-12 00:48
fsck.xfs
1.92
KB
-rwxr-xr-x
2023-10-15 05:10
fsfreeze
16.38
KB
-rwxr-xr-x
2026-02-04 20:18
fstrim
49.6
KB
-rwxr-xr-x
2026-02-04 20:18
fuse2fs
70.39
KB
-rwxr-xr-x
2025-10-07 07:08
fuser
38.14
KB
-rwxr-xr-x
2020-11-06 14:24
g13-syshelp
189.76
KB
-rwxr-xr-x
2026-01-16 01:48
gdisk
214.46
KB
-rwxr-xr-x
2022-10-12 10:53
genhomedircon
29.27
KB
-rwxr-xr-x
2024-07-02 21:04
genhostid
11.88
KB
-rwxr-xr-x
2025-11-10 10:42
genl
121.41
KB
-rwxr-xr-x
2024-05-23 08:36
genrandom
12.38
KB
-rwxr-xr-x
2026-06-08 03:38
getcap
12.35
KB
-rwxr-xr-x
2026-05-04 20:33
getenforce
7.84
KB
-rwxr-xr-x
2026-02-10 14:26
getpaneluserscount
738
B
-rwxr-xr-x
2026-04-03 15:53
getpcaps
12.27
KB
-rwxr-xr-x
2026-05-04 20:33
getsebool
11.87
KB
-rwxr-xr-x
2026-02-10 14:26
groupadd
95.34
KB
-rwxr-xr-x
2025-12-18 13:51
groupdel
91.09
KB
-rwxr-xr-x
2025-12-18 13:51
groupmems
61.48
KB
-rwxr-xr-x
2025-12-18 13:51
groupmod
99.38
KB
-rwxr-xr-x
2025-12-18 13:51
grpck
61.47
KB
-rwxr-xr-x
2025-12-18 13:51
grpconv
57.27
KB
-rwxr-xr-x
2025-12-18 13:51
grpunconv
57.26
KB
-rwxr-xr-x
2025-12-18 13:51
grub2-bios-setup
1.16
MB
-rwxr-xr-x
2026-05-23 12:32
grub2-get-kernel-settings
2.68
KB
-rwxr-xr-x
2026-05-23 12:32
grub2-install
1.44
MB
-rwxr-xr-x
2026-05-23 12:32
grub2-macbless
1.14
MB
-rwxr-xr-x
2026-05-23 12:32
grub2-mkconfig
8.68
KB
-rwxr-xr-x
2026-05-23 12:32
grub2-ofpathname
246.3
KB
-rwxr-xr-x
2026-05-23 12:32
grub2-probe
1.16
MB
-rwxr-xr-x
2026-05-23 12:32
grub2-reboot
3.99
KB
-rwxr-xr-x
2026-05-23 12:32
grub2-rpm-sort
283.15
KB
-rwxr-xr-x
2026-05-23 12:32
grub2-set-bootflag
16.35
KB
-rwsr-xr-x
2026-05-23 12:32
grub2-set-default
3.45
KB
-rwxr-xr-x
2026-05-23 12:32
grub2-set-password
3.05
KB
-rwxr-xr-x
2026-05-23 12:32
grub2-setpassword
3.05
KB
-rwxr-xr-x
2026-05-23 12:32
grub2-sparc64-setup
1.16
MB
-rwxr-xr-x
2026-05-23 12:32
grub2-switch-to-blscfg
8.6
KB
-rwxr-xr-x
2026-05-23 12:32
grubby
260
B
-rwxr-xr-x
2024-04-06 13:02
gss-server
24.61
KB
-rwxr-xr-x
2026-05-13 06:34
gssproxy
132.08
KB
-rwxr-xr-x
2022-10-08 08:02
halt
218.45
KB
-rwxr-xr-x
2026-04-23 11:13
hardlink
17.09
KB
-rwxr-xr-x
2019-10-15 21:49
hdparm
131.91
KB
-rwxr-xr-x
2021-10-08 19:47
htcacheclean
36.63
KB
-rwxr-xr-x
2026-06-10 15:43
httpd
693.58
KB
-rwxr-xr-x
2026-06-10 15:43
hwclock
65.22
KB
-rwxr-xr-x
2026-02-04 20:18
hybrid-to-normal
2.08
KB
-rwxr-xr-x
2026-06-11 11:31
iconvconfig
33.05
KB
-rwxr-xr-x
2026-05-26 09:39
ifconfig
80.86
KB
-rwxr-xr-x
2020-08-30 17:47
ifdown
2.07
KB
-rwxr-xr-x
2025-09-23 08:27
ifenslave
24.95
KB
-rwxr-xr-x
2023-10-14 17:19
ifstat
117.67
KB
-rwxr-xr-x
2024-05-23 08:36
ifup
5.33
KB
-rwxr-xr-x
2025-09-23 08:27
im360-ssl-cache
7.69
MB
-rwxr-xr-x
2026-06-02 09:03
imunify-auditd-log-reader
18.14
MB
-rwxr-xr-x
2026-04-01 12:47
imunify-auditd-log-reader-cfg-reload
445
B
-rwxr-xr-x
2026-04-01 12:47
imunify-notifier
9.82
MB
-rwxr-xr-x
2024-10-25 12:14
imunify-realtime-av
10.19
MB
-rwxr-xr-x
2026-05-26 14:33
imunify-realtime-av.imrt2
10.19
MB
-rwxr-xr-x
2026-05-26 14:33
imunify-realtime-av.legacy
11.02
MB
-rwxr-xr-x
2026-04-28 16:41
imunify-realtime-av.legacy.orig
8.78
MB
-rwxr-xr-x
2025-10-02 10:39
imunify360-pam
51.63
KB
-rwxr-xr-x
2026-05-12 14:29
imunify360-php-daemon
21.17
MB
-rwxr-xr-x
2026-04-24 05:54
imunify360-scanlogd
15.62
KB
-rwx------
2024-05-20 09:49
imunify360-unified-access-logger
12.85
MB
-rwxr-xr-x
2025-12-29 10:16
imunify360-watchdog
10.24
KB
-rwxr-xr-x
2026-05-28 11:26
imunify360-webshield
1.46
MB
-rwxr-xr-x
2026-06-02 09:03
imunify360-webshield-compose-lists
7.01
KB
-rwxr-xr-x
2026-06-02 08:46
imunify360-webshield-ipdetect
11.51
KB
-rwxr-xr-x
2026-06-02 08:46
imunify360-webshield-ssl-cache
7.69
MB
-rwxr-xr-x
2026-06-02 09:03
init
1.54
MB
-rwxr-xr-x
2026-04-23 11:13
insmod
159.98
KB
-rwxr-xr-x
2024-04-22 16:52
install-info
50.23
KB
-rwxr-xr-x
2022-04-18 17:09
installkernel
323
B
-rwxr-xr-x
2024-04-06 13:02
intel_sdsi
15.62
KB
-rwxr-xr-x
2026-05-28 14:34
ip
693.3
KB
-rwxr-xr-x
2024-05-23 08:36
ip6tables
220.8
KB
-rwxr-xr-x
2024-04-02 18:37
ip6tables-apply
6.89
KB
-rwxr-xr-x
2024-04-02 18:37
ip6tables-restore
220.8
KB
-rwxr-xr-x
2024-04-02 18:37
ip6tables-restore-translate
220.8
KB
-rwxr-xr-x
2024-04-02 18:37
ip6tables-save
220.8
KB
-rwxr-xr-x
2024-04-02 18:37
ip6tables-translate
220.8
KB
-rwxr-xr-x
2024-04-02 18:37
ipmaddr
21
KB
-rwxr-xr-x
2020-08-30 17:47
iprconfig
408.03
KB
-rwxr-xr-x
2020-08-30 07:37
iprdbg
137.57
KB
-rwxr-xr-x
2020-08-30 07:37
iprdump
129.3
KB
-rwxr-xr-x
2020-08-30 07:37
iprinit
125.28
KB
-rwxr-xr-x
2020-08-30 07:37
iprsos
2.18
KB
-rwxr-xr-x
2020-05-08 14:19
iprupdate
129.3
KB
-rwxr-xr-x
2020-08-30 07:37
ipset
9.01
KB
-rwxr-xr-x
2019-11-12 14:33
iptables
220.8
KB
-rwxr-xr-x
2024-04-02 18:37
iptables-apply
6.89
KB
-rwxr-xr-x
2024-04-02 18:37
iptables-restore
220.8
KB
-rwxr-xr-x
2024-04-02 18:37
iptables-restore-translate
220.8
KB
-rwxr-xr-x
2024-04-02 18:37
iptables-save
220.8
KB
-rwxr-xr-x
2024-04-02 18:37
iptables-translate
220.8
KB
-rwxr-xr-x
2024-04-02 18:37
iptunnel
25
KB
-rwxr-xr-x
2020-08-30 17:47
irqbalance
62.28
KB
-rwxr-xr-x
2023-10-14 17:57
irqbalance-ui
41.29
KB
-rwxr-xr-x
2023-10-14 17:57
isc-hmac-fixup
11.85
KB
-rwxr-xr-x
2026-06-08 03:38
isolatectl
9.06
KB
-rwxr-xr-x
2026-05-20 17:27
kexec
194.98
KB
-rwxr-xr-x
2026-02-10 17:24
key.dns_resolver
24.52
KB
-rwxr-xr-x
2021-10-08 13:50
kill_php_script
572
B
-rwxr-xr-x
2026-05-20 17:27
kpartx
49.05
KB
-rwxr-xr-x
2026-05-05 11:28
lchage
16.41
KB
-rwxr-xr-x
2024-09-24 02:24
ldattach
32.99
KB
-rwxr-xr-x
2026-02-04 20:18
ldconfig
986.13
KB
-rwxr-xr-x
2026-05-26 09:39
lfd
382.45
KB
-rwx------
2025-02-28 06:11
lgroupadd
11.88
KB
-rwxr-xr-x
2024-09-24 02:24
lgroupdel
11.88
KB
-rwxr-xr-x
2024-09-24 02:24
lgroupmod
19.88
KB
-rwxr-xr-x
2024-09-24 02:24
lid
16.27
KB
-rwxr-xr-x
2024-09-24 02:24
lnewusers
19.87
KB
-rwxr-xr-x
2024-09-24 02:24
lnstat
25.33
KB
-rwxr-xr-x
2024-05-23 08:36
load_policy
12.28
KB
-rwxr-xr-x
2024-07-02 21:04
log2journal
5.74
MB
-rwxr-xr-x
2026-01-22 00:47
logrotate
93.03
KB
-rwxr-xr-x
2023-04-02 00:29
logsave
16.41
KB
-rwxr-xr-x
2025-10-07 07:08
losetup
90.59
KB
-rwxr-xr-x
2026-02-04 20:18
lpasswd
20.35
KB
-rwxr-xr-x
2024-09-24 02:24
lshw
969.55
KB
-rwxr-xr-x
2025-10-07 08:50
lsmod
159.98
KB
-rwxr-xr-x
2024-04-22 16:52
lspci
94.85
KB
-rwxr-xr-x
2023-03-31 21:30
luseradd
19.88
KB
-rwxr-xr-x
2024-09-24 02:24
luserdel
15.88
KB
-rwxr-xr-x
2024-09-24 02:24
lusermod
19.88
KB
-rwxr-xr-x
2024-09-24 02:24
lvdctl
683
B
-rwxr-xr-x
2026-05-20 17:27
lve-bursting-cleanup
492
B
-rwxr-xr-x
2026-05-20 17:45
lve-bursting-cleanup.python
492
B
-rwxr-xr-x
2026-05-20 17:45
lve-bursting-info
492
B
-rwxr-xr-x
2026-05-20 17:45
lve-bursting-info.python
492
B
-rwxr-xr-x
2026-05-20 17:45
lve-create-db
492
B
-rwxr-xr-x
2026-05-20 17:45
lve-create-db.python
492
B
-rwxr-xr-x
2026-05-20 17:45
lve-read-snapshot
492
B
-rwxr-xr-x
2026-05-20 17:45
lve-read-snapshot.python
492
B
-rwxr-xr-x
2026-05-20 17:45
lve_ns_setup
136.23
KB
-rwxr-xr-x
2026-05-18 13:17
lve_root_setup
75.19
KB
-rwxr-xr-x
2026-05-18 13:17
lvechart
492
B
-rwxr-xr-x
2026-05-20 17:45
lvechart.python
492
B
-rwxr-xr-x
2026-05-20 17:45
lvectl
55.4
KB
-rwxr-xr-x
2026-05-20 17:27
lveinfo
492
B
-rwxr-xr-x
2026-05-20 17:45
lveinfo.python
492
B
-rwxr-xr-x
2026-05-20 17:45
lveps
48.44
KB
-rwxr-xr-x
2026-05-20 18:04
lvestats-burstwatcher
492
B
-rwxr-xr-x
2026-05-20 17:45
lvestats-burstwatcher.python
492
B
-rwxr-xr-x
2026-05-20 17:45
lvestats-server
492
B
-rwxr-xr-x
2026-05-20 17:45
lvestats-server.python
492
B
-rwxr-xr-x
2026-05-20 17:45
lvetop
37
B
-rwxr-xr-x
2026-05-20 17:27
lwresd
840.93
KB
-rwxr-xr-x
2026-06-08 03:38
makedumpfile
425.19
KB
-rwxr-xr-x
2026-02-10 17:24
mariadbd
24.44
MB
-rwxr-xr-x
2025-04-25 17:25
matchpathcon
12.37
KB
-rwxr-xr-x
2026-02-10 14:26
mdadm
620.75
KB
-rwxr-xr-x
2025-11-05 10:54
mdmon
379.51
KB
-rwxr-xr-x
2025-11-05 10:54
mii-diag
25.4
KB
-rwxr-xr-x
2020-08-30 17:47
mii-tool
21.03
KB
-rwxr-xr-x
2020-08-30 17:47
mkdict
251
B
-rwxr-xr-x
2019-10-12 00:47
mkdosfs
39.07
KB
-rwxr-xr-x
2019-10-12 00:48
mkdumprd
12.68
KB
-rwxr-xr-x
2026-02-10 17:24
mke2fs
138.45
KB
-rwxr-xr-x
2025-10-07 07:08
mkfadumprd
2.23
KB
-rwxr-xr-x
2026-02-10 17:24
mkfs
16.48
KB
-rwxr-xr-x
2026-02-04 20:18
mkfs.cramfs
41.27
KB
-rwxr-xr-x
2026-02-04 20:18
mkfs.ext2
138.45
KB
-rwxr-xr-x
2025-10-07 07:08
mkfs.ext3
138.45
KB
-rwxr-xr-x
2025-10-07 07:08
mkfs.ext4
138.45
KB
-rwxr-xr-x
2025-10-07 07:08
mkfs.fat
39.07
KB
-rwxr-xr-x
2019-10-12 00:48
mkfs.minix
86.56
KB
-rwxr-xr-x
2026-02-04 20:18
mkfs.msdos
39.07
KB
-rwxr-xr-x
2019-10-12 00:48
mkfs.vfat
39.07
KB
-rwxr-xr-x
2019-10-12 00:48
mkfs.xfs
475.98
KB
-rwxr-xr-x
2023-10-15 05:11
mkhomedir_helper
24.44
KB
-rwxr-xr-x
2025-12-17 18:54
mklost+found
11.86
KB
-rwxr-xr-x
2025-10-07 07:08
mksquashfs
186.83
KB
-rwxr-xr-x
2024-04-06 14:17
mkswap
86.48
KB
-rwxr-xr-x
2026-02-04 20:18
modinfo
159.98
KB
-rwxr-xr-x
2024-04-22 16:52
modprobe
159.98
KB
-rwxr-xr-x
2024-04-22 16:52
modsec-sdbm-util
25.83
KB
-rwxr-x---
2024-05-22 16:19
mount.nfs
197.24
KB
-rwsr-xr-x
2026-03-09 13:08
mount.nfs4
197.24
KB
-rwsr-xr-x
2026-03-09 13:08
mountstats
42.22
KB
-rwxr-xr-x
2026-03-09 13:07
mysqld
24.44
MB
-rwxr-xr-x
2025-04-25 17:25
named
840.93
KB
-rwxr-xr-x
2026-06-08 03:38
named-checkconf
40.79
KB
-rwxr-xr-x
2026-06-08 03:38
named-checkzone
36.63
KB
-rwxr-xr-x
2026-06-08 03:38
named-compilezone
36.63
KB
-rwxr-xr-x
2026-06-08 03:38
named-journalprint
11.85
KB
-rwxr-xr-x
2026-06-08 03:38
nameif
16.98
KB
-rwxr-xr-x
2020-08-30 17:47
nd-mcp
5.84
MB
-rwxr-xr-x
2026-01-22 00:48
nd-run
39.87
KB
-rwxr-xr-x
2026-01-22 00:41
netdata
143.11
MB
-rwxr-xr-x
2026-01-22 01:04
netdata-claim.sh
3.67
KB
-rwxr-xr-x
2026-01-22 00:41
netdatacli
4.46
MB
-rwxr-xr-x
2026-01-22 00:48
newusers
107.23
KB
-rwxr-xr-x
2025-12-18 13:51
nfsconf
37.48
KB
-rwxr-xr-x
2026-03-09 13:08
nfsconvert
13.03
KB
-rwxr-xr-x
2026-03-09 13:08
nfsdcld
65.87
KB
-rwxr-xr-x
2026-03-09 13:08
nfsdclddb
10
KB
-rwxr-xr-x
2026-03-09 13:07
nfsdclnts
9.02
KB
-rwxr-xr-x
2026-03-09 13:07
nfsdcltrack
49.78
KB
-rwxr-xr-x
2026-03-09 13:08
nfsidmap
45.35
KB
-rwxr-xr-x
2026-03-09 13:08
nfsiostat
23.36
KB
-rwxr-xr-x
2026-03-09 13:07
nfsref
65.8
KB
-rwxr-xr-x
2026-03-09 13:08
nfsstat
35.52
KB
-rwxr-xr-x
2026-03-09 13:08
nft
24.41
KB
-rwxr-xr-x
2025-01-28 01:24
nologin
11.87
KB
-rwxr-xr-x
2026-02-04 20:18
normal-to-hybrid
2.23
KB
-rwxr-xr-x
2026-06-11 11:31
nscd
156.68
KB
-rwxr-xr-x
2026-05-26 09:39
nsec3hash
12.29
KB
-rwxr-xr-x
2026-06-08 03:38
nstat
113.57
KB
-rwxr-xr-x
2024-05-23 08:36
ownership
12.4
KB
-rwxr-xr-x
2024-04-06 13:04
packer
13.05
KB
-rwxr-xr-x
2019-10-12 00:47
pam_console_apply
45.2
KB
-rwxr-xr-x
2025-12-17 18:54
pam_imunify_daemon.bin
9.98
MB
-rwxr-xr-x
2026-05-12 14:29
pam_timestamp_check
11.87
KB
-rwsr-xr-x
2025-12-17 18:54
paperconfig
4.07
KB
-rwxr-xr-x
2019-10-12 20:09
parted
85.6
KB
-rwxr-xr-x
2021-10-08 15:43
partprobe
16.39
KB
-rwxr-xr-x
2021-10-08 15:43
partx
94.5
KB
-rwxr-xr-x
2026-02-04 20:18
pdns_server
6.26
MB
-rwxr-xr-x
2026-05-19 16:55
pidof
16.7
KB
-rwxr-xr-x
2023-10-14 20:31
ping
66.13
KB
-rwxr-xr-x
2023-10-14 17:19
ping6
66.13
KB
-rwxr-xr-x
2023-10-14 17:19
pivot_root
12.38
KB
-rwxr-xr-x
2026-02-04 20:18
plipconfig
12.71
KB
-rwxr-xr-x
2020-08-30 17:47
plymouth-set-default-theme
6.05
KB
-rwxr-xr-x
2025-11-05 08:10
plymouthd
141.84
KB
-rwxr-xr-x
2025-11-05 08:11
poweroff
218.45
KB
-rwxr-xr-x
2026-04-23 11:13
processpaneluserspackages
2.79
KB
-rwxr-xr-x
2026-05-20 17:27
pure-authd
19.23
KB
-rwxr-xr-x
2025-06-06 14:16
pure-certd
19.14
KB
-rwxr-xr-x
2025-06-06 14:16
pure-config.pl
4.64
KB
-rwxr-xr-x
2025-06-06 14:14
pure-ftpd
182.07
KB
-rwxr-xr-x
2025-06-06 14:16
pure-ftpwho
26.83
KB
-rwxr-xr-x
2025-06-06 14:16
pure-mrtginfo
11.16
KB
-rwxr-xr-x
2025-06-06 14:16
pure-quotacheck
18.82
KB
-rwxr-xr-x
2025-06-06 14:16
pure-uploadscript
19.08
KB
-rwxr-xr-x
2025-06-06 14:16
pwck
57.27
KB
-rwxr-xr-x
2025-12-18 13:51
pwconv
53.1
KB
-rwxr-xr-x
2025-12-18 13:51
pwhistory_helper
20.44
KB
-rwxr-xr-x
2025-12-17 18:54
pwunconv
53.13
KB
-rwxr-xr-x
2025-12-18 13:51
quot
78.67
KB
-rwxr-xr-x
2021-10-09 07:08
quotacheck
115.75
KB
-rwxr-xr-x
2021-10-09 07:08
quotaoff
83.16
KB
-rwxr-xr-x
2021-10-09 07:08
quotaon
83.16
KB
-rwxr-xr-x
2021-10-09 07:08
quotastats
16.54
KB
-rwxr-xr-x
2021-10-09 07:08
raid-check
3.7
KB
-rwxr-xr-x
2025-11-05 07:57
rdisc
24.55
KB
-rwxr-xr-x
2023-10-14 17:19
rdma
187.38
KB
-rwxr-xr-x
2024-05-23 08:36
readprofile
20.55
KB
-rwxr-xr-x
2026-02-04 20:18
reboot
218.45
KB
-rwxr-xr-x
2026-04-23 11:13
repquota
83.24
KB
-rwxr-xr-x
2021-10-09 07:08
request-key
24.38
KB
-rwxr-xr-x
2021-10-08 13:50
resize2fs
64.91
KB
-rwxr-xr-x
2025-10-07 07:08
resizepart
41.57
KB
-rwxr-xr-x
2026-02-04 20:18
resolvconf
195.75
KB
-rwxr-xr-x
2026-04-23 11:13
restorecon
20.53
KB
-rwxr-xr-x
2024-07-02 21:04
restorecon_xattr
16.41
KB
-rwxr-xr-x
2024-07-02 21:04
rfkill
53.46
KB
-rwxr-xr-x
2026-02-04 20:18
rhn_check
4.25
KB
-rwxr-xr-x
2026-06-11 11:31
rhn_check-3.6
4.25
KB
-rwxr-xr-x
2026-06-11 11:31
rhnreg_ks
6.33
KB
-rwxr-xr-x
2026-06-11 11:31
rhnreg_ks-3.6
6.33
KB
-rwxr-xr-x
2026-06-11 11:31
rmmod
159.98
KB
-rwxr-xr-x
2024-04-22 16:52
rndc
36.53
KB
-rwxr-xr-x
2026-06-08 03:38
rndc-confgen
20.45
KB
-rwxr-xr-x
2026-06-08 03:38
rotatelogs
24.53
KB
-rwxr-xr-x
2026-06-10 15:43
route
67.63
KB
-rwxr-xr-x
2020-08-30 17:47
rpc.gssd
106.54
KB
-rwxr-xr-x
2026-03-09 13:08
rpc.idmapd
61.73
KB
-rwxr-xr-x
2026-03-09 13:08
rpc.mountd
163.04
KB
-rwxr-xr-x
2026-03-09 13:08
rpc.nfsd
49.91
KB
-rwxr-xr-x
2026-03-09 13:08
rpc.statd
103.29
KB
-rwxr-xr-x
2026-03-09 13:08
rpcbind
61.55
KB
-rwxr-xr-x
2022-10-12 11:00
rpcctl
9.41
KB
-rwxr-xr-x
2026-03-09 13:07
rpcdebug
19.38
KB
-rwxr-xr-x
2026-03-09 13:08
rpcinfo
32.64
KB
-rwxr-xr-x
2022-10-12 11:00
rsyslogd
724.73
KB
-rwxr-xr-x
2024-11-05 02:34
rtacct
46.94
KB
-rwxr-xr-x
2024-05-23 08:36
rtcwake
49.3
KB
-rwxr-xr-x
2026-02-04 20:18
rtmon
117.27
KB
-rwxr-xr-x
2024-05-23 08:36
rtstat
25.33
KB
-rwxr-xr-x
2024-05-23 08:36
runlevel
218.45
KB
-rwxr-xr-x
2026-04-23 11:13
runq
1.53
MB
-rwsr-xr-x
2026-05-29 19:00
runuser
48.99
KB
-rwxr-xr-x
2026-02-04 20:18
sasldblistusers2
20.77
KB
-rwxr-xr-x
2022-02-23 20:13
saslpasswd2
16.42
KB
-rwxr-xr-x
2022-02-23 20:13
sefcontext_compile
65.35
KB
-rwxr-xr-x
2026-02-10 14:26
selabel_digest
12.28
KB
-rwxr-xr-x
2026-02-10 14:26
selabel_lookup
12.27
KB
-rwxr-xr-x
2026-02-10 14:26
selabel_lookup_best_match
11.89
KB
-rwxr-xr-x
2026-02-10 14:26
selabel_partial_match
11.88
KB
-rwxr-xr-x
2026-02-10 14:26
selinux_check_access
12.36
KB
-rwxr-xr-x
2026-02-10 14:26
selinuxconlist
11.88
KB
-rwxr-xr-x
2026-02-10 14:26
selinuxdefcon
11.88
KB
-rwxr-xr-x
2026-02-10 14:26
selinuxenabled
7.84
KB
-rwxr-xr-x
2026-02-10 14:26
selinuxexeccon
11.86
KB
-rwxr-xr-x
2026-02-10 14:26
semodule
29.27
KB
-rwxr-xr-x
2024-07-02 21:04
sendmail
16.91
KB
-rwxr-sr-x
2026-05-29 19:00
service
3.64
KB
-rwxr-xr-x
2025-09-23 08:27
sestatus
20.41
KB
-rwxr-xr-x
2024-07-02 21:04
setcap
16.27
KB
-rwxr-xr-x
2026-05-04 20:33
setenforce
12.27
KB
-rwxr-xr-x
2026-02-10 14:26
setfiles
20.53
KB
-rwxr-xr-x
2024-07-02 21:04
setpci
28.56
KB
-rwxr-xr-x
2023-03-31 21:30
setquota
91.38
KB
-rwxr-xr-x
2021-10-09 07:08
setsebool
16.38
KB
-rwxr-xr-x
2024-07-02 21:04
sfdisk
118.51
KB
-rwxr-xr-x
2026-02-04 20:18
sgdisk
198.05
KB
-rwxr-xr-x
2022-10-12 10:53
showmount
21.06
KB
-rwxr-xr-x
2026-03-09 13:08
shutdown
218.45
KB
-rwxr-xr-x
2026-04-23 11:13
sim_server
11.87
KB
-rwxr-xr-x
2026-05-13 06:34
skdump
16.91
KB
-rwxr-xr-x
2019-10-15 21:57
sktest
12.81
KB
-rwxr-xr-x
2019-10-15 21:57
slattach
43.76
KB
-rwxr-xr-x
2020-08-30 17:47
sm-notify
78.13
KB
-rwxr-xr-x
2026-03-09 13:08
smartctl
907.08
KB
-rwxr-xr-x
2024-04-06 14:11
smartd
733.2
KB
-rwxr-xr-x
2024-04-06 14:11
ss
191.3
KB
-rwxr-xr-x
2024-05-23 08:36
sshd
869.7
KB
-rwxr-xr-x
2026-05-04 20:25
sss_cache
61.09
KB
-rwxr-xr-x
2026-02-10 17:01
sssd
73.01
KB
-rwxr-xr-x
2026-02-10 17:01
start-statd
838
B
-rwxr-xr-x
2018-09-06 18:09
start-stop-daemon
45.98
KB
-rwxr-xr-x
2021-12-15 12:46
suexec
20.41
KB
-rwsr-s---
2026-06-10 15:43
sulogin
49.24
KB
-rwxr-xr-x
2026-02-04 20:18
suphp
215.1
KB
-rwsr-x---
2025-08-21 17:43
swaplabel
16.5
KB
-rwxr-xr-x
2026-02-04 20:18
swapoff
20.75
KB
-rwxr-xr-x
2026-02-04 20:18
swapon
49.41
KB
-rwxr-xr-x
2026-02-04 20:18
switch_root
16.49
KB
-rwxr-xr-x
2026-02-04 20:18
sysctl
28.88
KB
-rwxr-xr-x
2023-10-14 20:31
syspurpose
415
B
-rwxr-xr-x
2025-07-15 09:13
systemd-cat-native
4.51
MB
-rwxr-xr-x
2026-01-22 00:45
tcsd
309.72
KB
-rwxr-xr-x
2024-04-06 12:42
telinit
218.45
KB
-rwxr-xr-x
2026-04-23 11:13
tipc
163.07
KB
-rwxr-xr-x
2024-05-23 08:36
tmpwatch
35.47
KB
-rwxr-xr-x
2019-10-12 11:32
tracepath
20.44
KB
-rwxr-xr-x
2023-10-14 17:19
tracepath6
20.44
KB
-rwxr-xr-x
2023-10-14 17:19
tsig-keygen
20.46
KB
-rwxr-xr-x
2026-06-08 03:38
tune2fs
110.63
KB
-rwxr-xr-x
2025-10-07 07:08
tuned
3.88
KB
-rwxr-xr-x
2024-02-22 12:23
tuned-adm
6.5
KB
-rwxr-xr-x
2024-02-22 12:23
udevadm
424.56
KB
-rwxr-xr-x
2026-04-23 11:13
umount.nfs
197.24
KB
-rwsr-xr-x
2026-03-09 13:08
umount.nfs4
197.24
KB
-rwsr-xr-x
2026-03-09 13:08
umount.udisks2
11.89
KB
-rwxr-xr-x
2025-09-03 09:08
unbound-anchor
57.34
KB
-rwxr-xr-x
2026-06-08 09:27
unix_chkpwd
36.86
KB
-rwsr-xr-x
2025-12-17 18:54
unix_update
36.86
KB
-rwx------
2025-12-17 18:54
unsquashfs
99.57
KB
-rwxr-xr-x
2024-04-06 14:17
update-alternatives
36.66
KB
-rwxr-xr-x
2023-10-14 22:48
update-pciids
1.71
KB
-rwxr-xr-x
2023-03-31 21:30
update-smart-drivedb
14.44
KB
-rwxr-xr-x
2024-04-06 14:11
useradd
148.16
KB
-rwxr-xr-x
2025-12-18 13:51
userdel
107.29
KB
-rwxr-xr-x
2025-12-18 13:51
userhelper
44.86
KB
-rws--x--x
2021-10-08 19:29
usermod
144.11
KB
-rwxr-xr-x
2025-12-18 13:51
usernetctl
12.42
KB
-rwsr-xr-x
2025-11-10 10:42
uuserver
15.88
KB
-rwxr-xr-x
2026-05-13 06:34
vdpa
118.04
KB
-rwxr-xr-x
2024-05-23 08:36
vigr
68.05
KB
-rwxr-xr-x
2025-12-18 13:51
vipw
68.05
KB
-rwxr-xr-x
2025-12-18 13:51
virt-what
14.22
KB
-rwxr-xr-x
2023-10-14 20:52
visudo
239.28
KB
-rwxr-xr-x
2026-04-29 08:49
vmcore-dmesg
28.58
KB
-rwxr-xr-x
2026-02-10 17:24
vpddecode
16.47
KB
-rwxr-xr-x
2024-04-06 13:04
wafd_imunify_daemon
15.9
MB
-rwxr-xr-x
2026-06-02 09:03
weak-modules
39.35
KB
-rwxr-xr-x
2024-04-22 16:52
whmapi0
3.33
MB
-rwxr-xr-x
2026-06-11 03:04
whmapi1
3.33
MB
-rwxr-xr-x
2026-06-11 03:04
whmlogin
2.33
KB
-rwxr-xr-x
2024-11-04 17:30
wipefs
41.12
KB
-rwxr-xr-x
2026-02-04 20:18
xfs_admin
1.38
KB
-rwxr-xr-x
2023-10-15 05:10
xfs_bmap
695
B
-rwxr-xr-x
2023-10-15 05:11
xfs_copy
434.59
KB
-rwxr-xr-x
2023-10-15 05:11
xfs_db
760.47
KB
-rwxr-xr-x
2023-10-15 05:11
xfs_estimate
12.39
KB
-rwxr-xr-x
2023-10-15 05:11
xfs_freeze
800
B
-rwxr-xr-x
2023-10-15 05:11
xfs_fsr
53.41
KB
-rwxr-xr-x
2023-10-15 05:11
xfs_growfs
422.48
KB
-rwxr-xr-x
2023-10-15 05:11
xfs_info
1.26
KB
-rwxr-xr-x
2023-10-15 05:11
xfs_io
188.28
KB
-rwxr-xr-x
2023-10-15 05:11
xfs_logprint
454.7
KB
-rwxr-xr-x
2023-10-15 05:11
xfs_mdrestore
410.09
KB
-rwxr-xr-x
2023-10-15 05:11
xfs_metadump
782
B
-rwxr-xr-x
2023-10-15 05:10
xfs_mkfile
1.02
KB
-rwxr-xr-x
2023-10-15 05:11
xfs_ncheck
685
B
-rwxr-xr-x
2023-10-15 05:10
xfs_quota
93.98
KB
-rwxr-xr-x
2023-10-15 05:11
xfs_repair
715.24
KB
-rwxr-xr-x
2023-10-15 05:11
xfs_rtcp
16.38
KB
-rwxr-xr-x
2023-10-15 05:11
xfs_spaceman
45.42
KB
-rwxr-xr-x
2023-10-15 05:11
xqmstats
16.45
KB
-rwxr-xr-x
2021-10-09 07:08
xtables-monitor
220.8
KB
-rwxr-xr-x
2024-04-02 18:37
xtables-nft-multi
220.8
KB
-rwxr-xr-x
2024-04-02 18:37
zabbix_agent2
20.47
MB
-rwxr-xr-x
2025-11-03 07:45
zdump
20.56
KB
-rwxr-xr-x
2026-05-26 09:39
zic
52.83
KB
-rwxr-xr-x
2026-05-26 09:39
zramctl
99.13
KB
-rwxr-xr-x
2026-02-04 20:18
Save
Rename
#!/opt/cloudlinux/venv/bin/python3 -bb # coding=utf-8 # # Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2018 All Rights Reserved # # Licensed under CLOUD LINUX LICENSE AGREEMENT # http://cloudlinux.com/docs/LICENCE.TXT # import getopt import logging import sys import pwd import syslog import os from typing import Tuple, Text # NOQA from clcommon.utils import is_root_or_exit, get_cl_version from cllimits_validator import LimitsValidator, ENTITY_USER, ENTITY_PACKAGE, ENTITY_RESELLER, ENTITY_DEFAULTS from cllimitslib_v2 import DEFAULTS from clveconfig import DEFAULT_PROVIDER, VE_CFG_PATH from cllimits.lib.utils import write_lower_bound, check_pmem_lower_bound, LowerBoundsConfigException is_root_or_exit() # check here or imports will fail import clcommon from clcommon.clproc import NoSuchLvp, LIMIT_LVP_ID from clcommon.cpapi.cpapiexceptions import CPAPIException from clcommon.lib.cledition import skip_without_lve from cllvectl.log import get_synchronous_logger import lveapi import lvestat as LVEStat from lve_utils.sentry import init_lve_utils_sentry_client from lve_utils.cagefs import ensure_lvd_proxy_commands import lvectllib as lve_commands from lvectllib import _page_to_memory_or_bytes, DomainLveIdError import cldetectlib as detect from lve_utils import PKG_VERSION from clcommon.cpapi import domain_owner as cpapi_domain_owner from websiteisolation.config import resolve_docroot from websiteisolation.exceptions import LvdError skip_without_lve() logger = get_synchronous_logger('lvectl') DO_NOT_EXIT = 999 PRINT_FORMATS = {True: { 8: '{"ID":"%s","SPEED":"%s","CPU":"%s","PMEM":"%s","VMEM":"%s","EP":"%s","NPROC":"%s","IO":"%s","IOPS":"%s"}', 6: '{"ID":"%s","SPEED":"%s","CPU":"%s","PMEM":"%s","VMEM":"%s","EP":"%s","NPROC":"%s","IO":"%s"}', 4: '{"ID":"%s","SPEED":"%s","CPU":"%s","VMEM":"%s","EP":"%s","IO":"%s"}'}, False: { 8: "%8s%8s%8s%8s%8s%8s%8s%8s", 6: "%8s%8s%8s%8s%8s%8s%8s", 4: "%8s%8s%8s%8s%8s"}} PRINT_HEADERS = {8: ('ID', 'SPEED', 'PMEM', 'VMEM', 'EP', 'NPROC', 'IO', 'IOPS'), 6: ('ID', 'SPEED', 'PMEM', 'VMEM', 'EP', 'NPROC', 'IO'), 4: ('ID', 'SPEED', 'VMEM', 'EP', 'IO')} _WPOS_DAEMON_SIGHUP_FILE = '/var/lve/wpos_reload' def _wpos_reload(): """ Create flag file for force sighup WPOS daemon """ try: if os.path.exists('/etc/clwpos/clwpos.json'): open(_WPOS_DAEMON_SIGHUP_FILE, 'w').close() except (OSError, IOError,): pass def print_error(message, print_usage_flag=False): if lve_commands.JSON: lve_commands.json_format( lve_commands.MULTI_FORMAT, ['ERROR', message] ) else: err_message = "error: %s" % message sys.stderr.write("%s\n" % err_message) if print_usage_flag: print_usage() def print_error_and_exit(message, exit_code=-1, print_usage_flag=False): print_error(message, print_usage_flag) if exit_code != DO_NOT_EXIT: sys.exit(exit_code) # GET VERSION from /proc/lve/list lve_ver = clcommon.get_lve_version() if lve_ver[0] is None: print_error_and_exit(lve_ver[1], 1) LVE_VERSION = lve_ver[0] LVE_VERSION = max(key for key in PRINT_HEADERS.keys() if key <= LVE_VERSION) # use max supported version try: lve_commands.init(LVE_VERSION) except Exception as e: print_error_and_exit(e, 1) # Check if JSON output required or old format without iops command_prompt = sys.argv[:] for i, el in enumerate(sys.argv): if el in ('json', '--json'): lve_commands.set_json(True) lve_commands.set_bytes('--bytes' in sys.argv) command_prompt.pop(i) if '--bytes' in sys.argv: command_prompt.pop(command_prompt.index('--bytes')) continue if el in ('no-iops', '--no-iops'): # check no-iops key in command prompt and drop LVE_VERSION to 6 if this key founded and LVE_VERSION is 8 if LVE_VERSION == 8: lve_commands.NOIOPS = True # STUPID HACK. Remove with iops release command_prompt.pop(i) continue syslog.openlog('lve-utils') def print_usage(): print('lvectl version ' + PKG_VERSION) print('usage: lvectl command [veid] [options]') print('commands:') print('apply apply config settings to specified LVE') print('apply all apply config settings to all the LVEs') print( 'apply-many to apply LVE limits to multiple distinct LVEs (uids of users are read from stdin)') print('set set parameters for a LVE and/or create a LVE') print('set-reseller create a LVP (resellers) container move LVE there') print('set-reseller-default set default limits for users inside LVP') print('sync-map load/update reseller:user map for correct support resellers limits') print('set-user set parameters for a LVE and/or create a LVE using username instead of ID') print('list list loaded LVEs') print('list-reseller list loaded LVPs, --with-name for display reselers name') print('list-domains <uid> list domain LVEs inside the user LVP for <uid>') print('allow-domain-limits <user> create user LVP and enable per-domain isolation for <user>') print('deny-domain-limits <user> remove user LVP and disable per-domain isolation for <user>') print('enable-domain-limits <domain> register domain LVE under user LVP (resolve domain internally)') print('disable-domain-limits <domain> unregister domain LVE and remove registry entry') print('list-user list loaded LVEs, display username instead of user id') print('limits show limits for loaded LVEs') print('all-user-list show limits for loaded LVEs with packages info') print('delete delete LVE and set configuration for that LVE to defaults') print( 'remove-reseller delete LVP container and record in config, move LVE containers to host container') print('delete-user delete LVE and set configuration for that user to defaults') print('destroy destroy LVE (configuration file remains unchanged)') print('destroy all destroy all LVE (configuration file remains unchanged)') print( 'destroy-many to destroy LVE limits to multiple distinct LVEs (uids of users are read from stdin)') print('package-set set LVE parameters for a package') print('package-list list LVE parameters for packages') print('reseller-package-list list LVE parameters for resellers packages') print( 'all-package-list list LVE parameters for all packages (whether it is resseler package or not )') print('package-delete delete LVE parameters for a package') print( 'paneluserslimits [reseller] show current user\'s limits for control panel. Reseller name is optional parameter') print('paneluserlimits show current limits for one user-id of user in control panel') print('set-pmem-lower-bound set PMEM lower bound, the minimal possible value of the PMEM limit') print('regenerate-domains update LVD domain config and ID mapping after domain rename, docroot change, or user rename') print('limit limit PID into specified LVE. Parameters PID LVE_ID') print('release release PID from LVE. Parameters PID') print('set-binary add binary to be run inside LVE on execution') print('del-binary remove binary from being run inside LVE on execution') print('list-binaries list all binaries to be run inside LVE on execution') print('load-binaries load binaries (used on startup) from config file') print('reload-binaries re-load list of binaries from config file') print('help (-h) show this message') print('version (-v) version number') print('lve-version lve version number') print('options:') print('--enters-count enable limit for enters count (by default disabled), use only with command "limit"') if "cl6" not in get_cl_version(): print('--io-and-memory enable limit for IO and memory (by default disabled), use only with command "limit"') print('--cpu=N limit CPU usage; (deprecated. Use --speed)') print('--speed=N% limit CPU usage in percentage; 100% is one core ') print('--speed=Nmhz\ghz limit CPU usage in mhz\ghz') print('--io=N define io limits (KB/s)') if LVE_VERSION > 4: print('--nproc=N limit number of processes') print('--pmem=N limit physical memory usage for aplications inside LVE') if LVE_VERSION > 6: print('--iops=N limit io operations per second') print('--mem=N mem alias for vmem (deprecated)') print('--vmem=N limit virtual memory for applications inside LVE') print('--maxEntryProcs=N limit number of entry processes') print('--save save configuration settings (use with set) (deprecated)') print('--save-all-parameters save all parameters even if they match with defaults settings') print('--json returns result of command json formatted') print('--bytes show all limits in bytes. Works only with --json') print('--unlimited set all limits to unlimited') print( '--reseller specify reseller name who owns the package/uid; use with package-set/package-delete/set command') print('--skip-custom skip calling custom script inside lvectl') print("""--default=A,B,C set limits to default value (will delete lve first) available limits are either from %s or 'all' to reset all limits""" % ( "cpu, io, mem/vmem, ep/maxEntryProcs, nproc, pmem" if LVE_VERSION > 4 else "cpu, io, mem/vmem, ep/maxEntryProcs, nproc, pmem, iops" if LVE_VERSION > 6 else "cpu, io, mem/vmem, ep/maxEntryProcs")) print( '--save-username save username in the config file. This parameter is used in conjunction with set-user') print(f'--skip-update-cfg skip updating LVE parameters in {VE_CFG_PATH} (use with set)') print('') def validate_options(options): opts = {'ncpu', 'speed', 'cpu', 'io', 'mem', 'vmem', 'ep', 'maxEntryProcs'} if LVE_VERSION > 4: opts.update(['nproc', 'pmem']) if LVE_VERSION > 6: opts.update(['iops']) if len(options) == 1 and "all" in options: options = opts # check all options are valid if len(set(options) - opts) > 0: print_error_and_exit( "%s are not available options.\n\navailable options are:\n%s" % ( ', '.join(set(options) - opts), '\n'.join(opts)) ) # map options to set_data keys opts_map = {'ncpu': 'ncpu', 'speed': 'cpu', 'cpu': 'cpu', 'io': 'io', 'mem': 'mem', 'vmem': 'mem', 'ep': 'ep', 'maxEntryProcs': 'ep', 'nproc': 'nproc', 'pmem': 'pmem', 'iops': 'iops'} return set([opts_map[k] for k in options]) def invalid_option(o, a): print('Invalid value for option %s: %s' % (o, a)) print_usage() sys.exit(1) def id_to_name(ve_id, display_user): if ve_id == 0: return 'default' elif ve_id == LIMIT_LVP_ID: return 'limit' if display_user: try: return pwd.getpwuid(ve_id).pw_name except KeyError: pass return str(ve_id) def get_line_data(line, stats, display_user, with_reseller_name=False, prefix=''): ID = id_to_name(line, display_user) if with_reseller_name and ID.isdigit(): # for show reseller name with id ID += ':' + (lve_commands.lve.map.get_reseller_name(int(ID)) or 'N/A') # N/A if can't find lvp_id reseller name ID = prefix + ID data = () stats_line = stats[line] # type: lvestat.LVEStat if lve_commands.JSON: if lve_commands.NOIOPS and LVE_VERSION == 8: data = (ID, stats_line.cpu, lve_commands.speed_to_old_cpu(stats_line.cpu), _page_to_memory_or_bytes(stats_line.lmemphy), _page_to_memory_or_bytes(stats_line.lmem), stats_line.lep, stats_line.lnproc, stats_line.io) elif LVE_VERSION == 8: data = (ID, stats_line.cpu, lve_commands.speed_to_old_cpu(stats_line.cpu), _page_to_memory_or_bytes(stats_line.lmemphy), _page_to_memory_or_bytes(stats_line.lmem), stats_line.lep, stats_line.lnproc, stats_line.io, stats_line.liops) elif LVE_VERSION == 6: data = (ID, stats_line.cpu, lve_commands.speed_to_old_cpu(stats_line.cpu), _page_to_memory_or_bytes(stats_line.lmemphy), _page_to_memory_or_bytes(stats_line.lmem), stats_line.lep, stats_line.lnproc, stats_line.io) elif LVE_VERSION == 4: data = (ID, stats_line.cpu, lve_commands.speed_to_old_cpu(stats_line.cpu), _page_to_memory_or_bytes(stats_line.lmem), stats_line.lep, stats_line.io) else: if lve_commands.NOIOPS and LVE_VERSION == 8: data = (ID, stats_line.cpu, _page_to_memory_or_bytes(stats_line.lmemphy), _page_to_memory_or_bytes(stats_line.lmem), stats_line.lep, stats_line.lnproc, stats_line.io) elif LVE_VERSION == 8: data = (ID, stats_line.cpu, _page_to_memory_or_bytes(stats_line.lmemphy), _page_to_memory_or_bytes(stats_line.lmem), stats_line.lep, stats_line.lnproc, stats_line.io, stats_line.liops) elif LVE_VERSION == 6: data = (ID, stats_line.cpu, _page_to_memory_or_bytes(stats_line.lmemphy), _page_to_memory_or_bytes(stats_line.lmem), stats_line.lep, stats_line.lnproc, stats_line.io) elif LVE_VERSION == 4: data = (ID, stats_line.cpu, _page_to_memory_or_bytes(stats_line.lmem), stats_line.lep, stats_line.io) return data def limits_print(ve_id, display_user=False, lvp=False, with_reseller_name=False): if lvp: if ve_id == 'all': stats = parseLVPList() else: try: stats = parseLVEList(ve_id) except IOError: # if /proc/lve/resellers/lvp{ve_id}/list no present stats = dict() else: stats = dict() if lve_commands.lve.reseller_limit_supported(): for lvp_id_ in parseLVPList(): # scan all /proc/lve/resellers/lvp{ID}/list stats.update(parseLVEList(lvp_id_, ignore_id=LIMIT_LVP_ID)) stats.update(parseLVEList()) if lve_commands.NOIOPS and LVE_VERSION == 8: out_format = PRINT_FORMATS[lve_commands.JSON][6] else: out_format = PRINT_FORMATS[lve_commands.JSON][LVE_VERSION] # Calculate the maximum username/reseller name length dynamically if not lve_commands.JSON and (display_user or with_reseller_name): # Default minimum width is 8 max_username_len = 8 for line in stats: username = id_to_name(line, display_user) if with_reseller_name and username.isdigit(): username += ":" + (lve_commands.lve.map.get_reseller_name(int(username)) or "N/A") max_username_len = max(max_username_len, len(username)) # Add 2 spaces of padding username_width = max_username_len + 2 # Replace the %8s format specifier for ID from PRINT_FORMATS template with the calculated dynamic width out_format = f"%{username_width}s" + out_format[3:] if lve_commands.JSON: result = '{"data":[' separator = "," else: if lve_commands.NOIOPS and LVE_VERSION == 8: result = out_format % PRINT_HEADERS[6] + "\n" else: result = out_format % PRINT_HEADERS[LVE_VERSION] + "\n" separator = "\n" if ve_id == 'all' or lvp: result += separator.join( (out_format % get_line_data(line, stats, display_user, with_reseller_name=with_reseller_name) for line in stats)) else: for line in stats: if line == ve_id: result += out_format % get_line_data(line, stats, display_user) if lve_commands.JSON: result += ']}' else: result += separator try: print(result) except IOError: pass def _parse_lve_lines(lines, id_=None, ignore_id=None): stats = {} for line in lines: stat = LVEStat.LVEStat(line, lve_ver[0]) if id_ is not None and stat.id != id_: # filter by id if need continue if ignore_id is not None and stat.id == ignore_id: continue if (lve_ver[0] < 8): cpu_data = lve_commands.CPUINFO_DATA stat.cpu = stat.cpu * cpu_data[0] # cpu_data[0] - Num_core elif (lve_ver[0] >= 8): stat.cpu = stat.cpu // 100 stats[stat.id] = stat return stats def parseLVEList(lvp_id=0, id_=None, ignore_id=None): with open(lve_commands.lve.proc.get_list_path(lvp_id=lvp_id)) as lines: lines.readline() return _parse_lve_lines(lines, id_=id_, ignore_id=ignore_id) def parseLVPList(): # Remove from LVE all resellers, wich absent in panel lve_commands.remove_absent_resellers() stats = {} for lvp_id in lve_commands.lve.proc.lvp_id_list(): try: stats[lvp_id] = parseLVEList(lvp_id=lvp_id, id_=LIMIT_LVP_ID)[LIMIT_LVP_ID] except KeyError: pass return stats def delete_lve(a, lvp_id=0): if not str(a).isdigit(): print_error_and_exit("LVE id must be number") if delete_lve_int(int(a)): return print_error_and_exit("Invalid LVE id") def send_json_ok(): if lve_commands.JSON: lve_commands.json_format(lve_commands.SINGLE_FORMAT, ['OK']) def delete_lve_int(lve_id): if lve_id > 0: try: lve_commands.lve_delete(lve_id) except DomainLveIdError as e: print_error_and_exit(str(e)) send_json_ok() return True def delete_lve_by_name(a): try: if delete_lve_int(pwd.getpwnam(a).pw_uid): return except KeyError: pass print_error_and_exit("invalid username given") def convert_to_int_or_exit(val, error_message, exit_code=-1): try: return int(val) except ValueError: print_error_and_exit(error_message, exit_code) def parse_int_param(el, set_data, param_name, min_val, set_limits, max_val=sys.maxsize, alias=None): if not alias: alias = param_name try: set_data[param_name] = convert_to_int_or_exit(el.split('--' + alias + '=')[1], 'Non integer %s limit provided' % alias) if max_val >= set_data[param_name] >= min_val: set_limits.add(param_name) return True else: print_error_and_exit("%s limit is out of range" % alias) except IndexError: pass return False def parse_set_data(args, set_data): args.pop(0) args.pop(0) args2 = [] if len(args) > 0 and not args[0].startswith("--"): raise Exception("Wrong args") skip_next = False args_length = len(args) for idx, el in enumerate(args): # used current value as value for previous key if skip_next: skip_next = False continue if el.startswith("--"): # --key=value format if el.find("=") > 0: args2.append(el) elif idx < (args_length - 1): # next element is key again if (args[idx + 1]).startswith("--"): args2.append(el) # either value else: args2.append(el + "=" + args[idx + 1]) skip_next = True # no more elements, so it is key elif idx == args_length - 1: args2.append(el) args = args2 set_limits = set([]) set_options = [set(['default']), set(['unlimited']), set(['cpu', 'speed', 'ncpu', 'vmem', 'mem', 'pmem', 'io', 'maxEntryProcs', 'ep', 'nproc', 'iops'])] for el in args: parsed = False if el.startswith('--'): if el.startswith('--cpu'): print('Warning: --cpu option had been deprecated, use --speed instead') if 'speed' in set_limits: print_error_and_exit('Error: used both cpu and speed limit.') parsed = parsed or parse_int_param(el, set_data, 'cpu', 1, set_limits, max_val=100) if el.startswith('--speed'): if 'cpu' in set_limits: print_error_and_exit('Error: used both cpu and speed limit.') speed = el.split('--speed=')[1] speedlimit = lve_commands.convert_from_speed(speed) if speedlimit is None: print_error_and_exit('Speed limit error', 1, 1) parsed = False else: parsed = True set_data['cpu'] = speed set_limits.add('speed') parsed = parsed or parse_int_param(el, set_data, 'ncpu', 0, set_limits) if el.startswith('--mem') or el.startswith('--vmem'): set_data['mem'] = clcommon.memory_to_page(el.split('=')[1]) if set_data['mem'] == None: print_error_and_exit("Invalid vmem value") parsed = parsed or True set_limits.add('mem') parsed = parsed or parse_int_param(el, set_data, 'io', 0, set_limits) parsed = parsed or parse_int_param(el, set_data, 'ep', 0, set_limits) parsed = parsed or parse_int_param(el, set_data, 'ep', 0, set_limits, alias='maxEntryProcs') parsed = parsed or parse_int_param(el, set_data, 'nproc', 0, set_limits) if el.startswith('--pmem'): set_data['pmem'] = clcommon.memory_to_page(el.split('=')[1]) if set_data['pmem'] is None: print_error_and_exit("Invalid pmem value") error = check_pmem_lower_bound(set_data['pmem']) if error: print_error_and_exit(error['message'] % error['context']) parsed = parsed or True set_limits.add('pmem') parsed = parsed or parse_int_param(el, set_data, 'iops', 0, set_limits) if el == '--save': print_error('--save option had been deprecated') parsed = True if el == '--save-all-parameters': set_data['save'] = True parsed = True if el == '--unlimited': set_data['cpu'] = 100 set_data['ncpu'] = 0 set_data['mem'] = 0 set_data['io'] = 0 set_data['ep'] = 0 set_data['pmem'] = 0 set_data['nproc'] = 0 set_data['iops'] = 0 set_limits.add('unlimited') parsed = True if el.startswith('--default='): if set_data['ve_id'] == 0: print_error_and_exit("Can not reset default ve to default") opts_to_default = set([p for p in el.split('=')[1].split(',') if p != '']) set_data['set-default'] = validate_options(opts_to_default) set_limits.add('default') parsed = True if el.startswith('--reseller='): reseller_name = el.split("=")[1] set_data['reseller_name'] = reseller_name parsed = True # LU-400 if el == '--skip-custom': parsed = True if el == '--skip-update-cfg': set_data['skip-update-cfg'] = True parsed = True else: print_error_and_exit("wrong arguments for command: set", print_usage_flag=True) if not parsed: print_error_and_exit("unrecognized option or bad limit given %s" % el) if sum(bool(set_limits.intersection(s)) for s in set_options) > 1: print_error_and_exit("can not combine options: %s" % ', '.join(set_limits)) def parse_reseller(reseller_id): # type: (Text) -> Tuple[Text, int] """ Try to obtain reseller name and LVP id from given info :param reseller_id: reseller name or LVP id """ def _lvp_id_to_reseller_name(_lvp_id): # type: (int) -> Optional[Text] if _lvp_id <= 0: print_error_and_exit('Incorrect user id {}'.format(reseller_id)) lve_commands.get_XML_cfg() reseller_name = lve_commands.lve.map.get_reseller_name(_lvp_id) return reseller_name def _reseller_name_to_lvp_id(name): # type: (Text) -> Optional[int] lve_commands.get_XML_cfg() _lvp_id = lve_commands.lve.map.get_reseller_id(name) return _lvp_id lvp_id = None reseller_name = None try: lvp_id = int(reseller_id) except ValueError: reseller_name = reseller_id lvp_id = _reseller_name_to_lvp_id(reseller_name) else: reseller_name = _lvp_id_to_reseller_name(lvp_id) if reseller_name is None or lvp_id is None: print_error_and_exit( "{} is neither an existing reseller's name nor an LVE id".format(reseller_id) ) return lvp_id, reseller_name def process_lve_set(args, o): # variable lvp_id using for identificate operations with lve top container; # None - operations with default lve container; # list[lve_id1, lve_id2, ..., lveid_n] - operations with lve top container included simple lve containers id lvp_id = 0 # args example set limitt to uid: # args: ['set', '1023', '--reseller=res', '--iops=2222'] # o == 'set' if len(args) == 1: print_error_and_exit('No LVE ID provided') else: set_data = {} entity_type = None entity_id = None if o in ('set',): if args[1] == 'default': set_data['ve_id'] = 0 entity_type = ENTITY_DEFAULTS entity_id = DEFAULTS else: set_data['ve_id'] = convert_to_int_or_exit(args[1], "LVE ID must be numeric") entity_type = ENTITY_USER if set_data['ve_id'] != 0 else ENTITY_DEFAULTS entity_id = set_data['ve_id'] if set_data['ve_id'] != 0 else DEFAULTS elif o == 'set-reseller-default': set_data['ve_id'] = 0 lve_commands.get_XML_cfg() # load config or load reseller_name:reseller_id map lvp_id, set_data['user'] = parse_reseller(args[1]) if not lve_commands.lve.proc.exist_lvp(lvp_id): # We can not set up defaults for non-existing reseller container print_error_and_exit('LVP container does not exist', 1) entity_type = ENTITY_DEFAULTS entity_id = set_data['user'] elif o == 'set-reseller': # TODO: LU-952 if args[1] == '--all': # for anable lvp containers all resellers lvp_id = list() lve_commands.get_XML_cfg() # load config or load reseller_name:reseller_id map for reseller_name in lve_commands.lve.map.resellers(): lvp_id.append((reseller_name, lve_commands.lve.map.get_reseller_id(reseller_name))) else: lvp_id, set_data['user'] = parse_reseller(args[1]) set_data['ve_id'] = lvp_id entity_type = ENTITY_RESELLER entity_id = set_data['user'] else: if '--save-username' in args: set_data['save-username'] = True args.remove('--save-username') try: set_data['ve_id'] = pwd.getpwnam(args[1]).pw_uid except KeyError: print_error_and_exit("Invalid user name") entity_type = ENTITY_USER entity_id = set_data['ve_id'] # initializing 'save' flag. # then it will be set True in parse_set_data if "--save-all-parameters" argument is given # LU-574 # Force to save the limits for reseller (not for user with the same name, but for reseller as virtual entity) set_data['save'] = True if o == 'set-reseller' else False parse_set_data(args, set_data) # TODO: LU-952 if '--all' not in args: # Validation of settable limits. LU-919 limits_validator = LimitsValidator() result, messages = limits_validator.validate_input_limits( entity_type, entity_id, set_data ) if not result: print_error_and_exit( 'You\'re trying to set invalid LVE limits. {}'.format(' '.join(messages)), ) try: if isinstance(lvp_id, list): # if lvp list use for many lvp for reseller_name, lvp_id_ in lvp_id: set_data_ = dict(set_data) set_data_.update({'user': reseller_name, 've_id': lvp_id_}) lve_commands.lve_set(set_data_, lvp_id=lvp_id_) else: # Set limits for user's LVE if not lve_commands.lve_set(set_data, lvp_id=lvp_id): # Error lve_id does not match reseller print_error_and_exit( "User id '%s' is not owned by '%s'" % ( set_data['ve_id'], set_data.get('reseller_name', 'root') ) ) except DomainLveIdError as e: print_error_and_exit(str(e)) send_json_ok() return set_data def process_lve_package_set(args, lve_command_func=lve_commands.package_set): if len(args) == 1: print_error_and_exit('No package ID provided') else: set_data = {'ve_id': args[1], 'save': True} parse_set_data(args, set_data) entity_id = set_data['ve_id'] reseller = set_data.get('reseller_name', DEFAULT_PROVIDER) limits_validator = LimitsValidator() result, messages = limits_validator.validate_input_limits( ENTITY_PACKAGE, entity_id, set_data, reseller=reseller ) if not result: print_error_and_exit( 'You\'re trying to set invalid LVE limits. {}'.format(' '.join(messages)), ) if 'reseller_name' in set_data: if not lve_commands.reseller_package_set(set_data): print_error_and_exit("Reseller '%s' does not have package '%s'" % (set_data['reseller_name'], set_data['ve_id'])) else: lve_command_func(set_data) send_json_ok() def check_support_reseller_limits(): """ Check support resellers limits If not enabled or not support exit end print diagnostic message """ # error code 38 - ENOSYS Function not implemented # check supported kernel if not lve_commands.lve.is_lve10(): print_error_and_exit( 'Please, update your LVE to 1.5.x to use this command', exit_code=38 ) # check supported clcommon panel_name = detect.getCPName() # check supported control panel if not lve_commands.lve.is_panel_supported(): print_error_and_exit( 'Reseller limits is not supported on "{}" control panel now'.format(panel_name), exit_code=38 ) def check_support_domain_limits(): """Check that the kernel supports per-domain LVPs (lve_lvp_create2).""" if not lve_commands.lve.py.domains_supported(): print_error_and_exit( 'Domain limits are not supported by this kernel (requires lve_lvp_create2)', exit_code=38 ) def sync_map(): """ load/update reseller:user map :return: """ lve_commands.get_XML_cfg() lve_commands.lve.sync_map() lve_commands.remove_absent_users() lve_commands.remove_absent_resellers() def _parse_named_args(raw_args): """Parse --key value / --key=value pairs from a raw arg list.""" result = {} i = 0 while i < len(raw_args): a = raw_args[i] if '=' in a and a.startswith('--'): key, val = a.split('=', 1) result[key.lstrip('-')] = val i += 1 elif a.startswith('--') and i + 1 < len(raw_args): result[a.lstrip('-')] = raw_args[i + 1] i += 2 else: print_error_and_exit(f"unknown argument '{a}'") return result def regenerate_domains(args): """Parse CLI args and delegate to lvectllib.regenerate_domains().""" if not lve_commands.lve.py.domains_supported(): return params = _parse_named_args(args[1:]) username = params.get('username') domain = params.get('domain') old_domain = params.get('old-domain') old_docroot = params.get('old-docroot') if not username: print_error_and_exit("regenerate-domains: --username is required") try: uid = pwd.getpwnam(username).pw_uid except KeyError: print_error_and_exit( f"regenerate-domains: user '{username}' not found") lve_commands.regenerate_domains(uid, domain=domain, old_domain=old_domain, old_docroot=old_docroot) def main(argv=None): opts = () args = () try: logger.info('Starting lvectl with arguments: %s', sys.argv) opts, args = getopt.getopt(argv or command_prompt[1:], 'vh:', ['help', 'version', 'apply=', 'list', 'list-reseller', 'list-domains', 'list-user', 'limits=', 'all-user-list', 'destroy=', 'delete=', 'remove-reseller=', 'allow-domain-limits=', 'deny-domain-limits=', 'enable-domain-limits=', 'disable-domain-limits=', "delete-user=", 'set=', 'set-reseller=', 'set-user=', 'ubc', 'package-set=', 'package-set-ext=', 'package-delete=', 'package-list', 'reseller-package-list', 'all-package-list', 'sync-map', 'start', 'lve-version', 'destroy-many', 'apply-many', 'paneluserslimits', 'limit=', 'release=', 'set-binary', 'del-binary', 'list-binaries', 'load-binaries', 'reload-binaries', 'paneluserlimits', 'set-pmem-lower-bound=', 'destroy-and-recreate-all']) except getopt.GetoptError: print_error_and_exit('unknown or missing command', 1, True) if len(opts) == 0 and len(args) == 0: print_error_and_exit('unknown or missing command', 1, True) # hack for using line like lvectl command argument if len(opts) == 0: opts = [] for i in range(0, len(args), 2): if i + 1 < len(args): opts.append((args[i], args[i + 1])) else: opts.append((args[i], '')) executed = False for command, arg in opts: arg: str if command in ('-v', '--version', 'version'): print(PKG_VERSION) sys.exit(0) if command in ('--lve-version', 'lve-version'): if lve_commands.JSON: lve_commands.json_format( lve_commands.MULTI_FORMAT, ['OK', LVE_VERSION] ) else: print(LVE_VERSION) sys.exit(0) if command in ('-h', '--help', 'help'): print_usage() sys.exit(0) if command in ('start', '--start'): executed = True lve_commands.get_XML_cfg() lve_commands.lve_start() if command in ('sync-map',): check_support_reseller_limits() sync_map() lve_commands.write_effective_cache() sys.exit(0) if command in ('regenerate-domains',): regenerate_domains(args) send_json_ok() sys.exit(0) if command in ('set-binary', '--set-binary'): lve_commands.get_global_lock(True) lve_commands.set_binary(arg) send_json_ok() sys.exit(0) if command in ('del-binary', '--del-binary'): lve_commands.get_global_lock(True) lve_commands.del_binary(arg) send_json_ok() sys.exit(0) if command in ('list-binaries', '--list-binaries'): lve_commands.list_binaries() sys.exit(0) if command in ('load-binaries', '--load-binaries'): lve_commands.load_binaries() send_json_ok() sys.exit(0) if command in ('reload-binaries', '--reload-binaries'): lve_commands.reload_binaries() send_json_ok() sys.exit(0) if command in ('apply-many', '--apply-many'): executed = True users = sys.stdin.readlines() if len(users) == 0: print_error_and_exit('user list is empty') lve_commands.apply_many(users) # Cached effective limits will be written to file once per operation. lve_commands.write_effective_cache() if command in ('destroy-many', '--destroy-many'): executed = True users = sys.stdin.readlines() if len(users) == 0: print_error_and_exit('user list is empty') lve_commands.destroy_many(users) _wpos_reload() if command in ('apply', '--apply'): executed = True if len(arg) != 0: if arg == 'all': lve_commands.lve_apply_all() if lve_commands.lve.reseller_limit_supported(): lve_commands.lve.sync_map() lve_commands.write_effective_cache(reset=True) send_json_ok() sys.exit(0) else: lve_id = convert_to_int_or_exit(arg, 'Invalid LVE ID') if lve_id >= 0: lve_commands.get_XML_cfg() if lve_commands.lve.reseller_limit_supported(): lve_commands.get_XML_cfg(lvp_id=lve_commands.lve.lve2lvp(lve_id)) lve_commands.lve_apply(lve_id) if lve_commands.lve.reseller_limit_supported(): lve_commands.lve.sync_map() else: print_error_and_exit("Invalid LVE Id") lve_commands.write_effective_cache() send_json_ok() if command in ('limit', '--limit'): executed = True flags = lveapi.LVE_NO_UBC | lveapi.LVE_NO_MAXENTER supported_flags = { "enters-count": lveapi.LVE_NO_MAXENTER } if "cl6" not in get_cl_version(): supported_flags["io-and-memory"] = lveapi.LVE_NO_UBC flags_count = 0 for arg in args[1:]: if not arg.startswith("--"): break flag = arg[2:] if flag in supported_flags: flags &= ~supported_flags[flag] flags_count += 1 else: print_error_and_exit(f"No such flag: {arg}. Please, use only {list(supported_flags.keys())}.") try: PID = convert_to_int_or_exit(args[flags_count + 1], "PID must be numeric.") except IndexError: print_error_and_exit("You have to specify PID.") try: VE = convert_to_int_or_exit(args[flags_count + 2], "LVE ID must be numeric.") except IndexError: print_error_and_exit("You have to specify LVE ID.") lve_commands.limit_pid(VE, PID, flags) send_json_ok() if command in ('release', '--release'): executed = True PID = convert_to_int_or_exit(arg, 'PID must be numeric') lve_commands.release_pid(PID) send_json_ok() if command in ('list', '--list'): executed = True limits_print('all') if command in ('list-user', '--list-user'): executed = True limits_print('all', True) if command in ('paneluserslimits', '--paneluserslimits'): executed = True if len(arg) == 0: lve_commands.paneluserslimits() # LU-530 else: reseller = str(arg) lve_commands.paneluserslimits(reseller=reseller) if command in ('paneluserlimits', '--paneluserlimits'): executed = True if len(arg) == 0: print_error_and_exit('paneluserlimits takes USER ID of control panel') user_id = convert_to_int_or_exit(arg, "bad USER ID") if user_id >= 0: lve_commands.paneluserslimits(userid=user_id) else: print_error_and_exit("bad USER ID") if command in ('set-pmem-lower-bound', '--set-pmem-lower-bound'): executed = True if len(arg) == 0: print_error_and_exit('set-pmem-lower-bound requires a memory limit (e.g., 512M, 1024M)') # Validate the memory format by trying to parse it pmem_pages = clcommon.memory_to_page(arg) if pmem_pages is None: print_error_and_exit("Invalid memory format. Use format like 512M, 1024M, 2G") # Write to config file try: result = write_lower_bound('PMEM', arg) except LowerBoundsConfigException as e: print_error_and_exit(e.message % e.context) else: if result: print(f"PMEM lower bound set to {arg}") send_json_ok() else: print_error_and_exit("Failed to write PMEM lower bound config file") if command in ('limits', '--limits'): executed = True if len(arg) == 0: print_error_and_exit("limits takes LVE ID or 'all' argument") if arg == 'default': arg = 0 if arg == 'all': limits_print(arg) sys.exit(0) lve_id = convert_to_int_or_exit(arg, "bad LVE ID") if lve_id >= 0: limits_print(lve_id) else: print_error_and_exit("bad LVE id") if command in ('list-reseller',): executed = True check_support_reseller_limits() if len(arg) == 0 or arg in ('--bytes',): limits_print('all', lvp=True) # print limits for all resellers elif '--with-name' == arg: lve_commands.get_XML_cfg() # for loading reseller_name<=>reseller_id map form ve.cfg limits_print('all', lvp=True, with_reseller_name=True) else: lvp_id, _ = parse_reseller(arg) limits_print(lvp_id, lvp=True) if command in ('list-domains',): executed = True check_support_domain_limits() if not arg: print_error_and_exit('Usage: lvectl list-domains <uid>') lvp_id = convert_to_int_or_exit(arg, 'bad user id') limits_print(lvp_id, lvp=True) if command in ('allow-domain-limits',): executed = True check_support_domain_limits() if not arg: print_error_and_exit('Usage: lvectl allow-domain-limits <user>') try: lve_id = pwd.getpwnam(arg).pw_uid except KeyError: print_error_and_exit(f'unknown user: {arg}') # CLOS-4402: register LVD proxyexec helpers in /etc/cagefs/proxy.commands # so `isolatectl limits set` works inside CageFS without requiring a # prior `cagefsctl --isolates-allow`. No-op when CageFS isn't installed. ensure_lvd_proxy_commands() lve_commands.get_XML_cfg() if lve_commands.lve.reseller_limit_supported(): lve_commands.get_XML_cfg(lvp_id=lve_commands.lve.lve2lvp(lve_id)) lve_commands.enable_domain_isolation(lve_id) lve_commands.lve_apply(lve_id) lve_commands.write_effective_cache() send_json_ok() if command in ('deny-domain-limits',): executed = True check_support_domain_limits() if not arg: print_error_and_exit('Usage: lvectl deny-domain-limits <user>') try: lve_id = pwd.getpwnam(arg).pw_uid except KeyError: print_error_and_exit(f'unknown user: {arg}') lve_commands.get_XML_cfg() if lve_commands.lve.reseller_limit_supported(): lve_commands.get_XML_cfg(lvp_id=lve_commands.lve.lve2lvp(lve_id)) lve_commands.disable_domain_isolation(lve_id) lve_commands.lve_apply(lve_id) lve_commands.write_effective_cache() send_json_ok() if command in ('enable-domain-limits',): executed = True check_support_domain_limits() if not arg: print_error_and_exit('Usage: lvectl enable-domain-limits <domain>') domain = arg owner_name = cpapi_domain_owner(domain) if not owner_name: print_error_and_exit(f'cannot determine owner of domain {domain!r} via panel API') owner_uid = pwd.getpwnam(owner_name).pw_uid try: docroot = resolve_docroot(domain) except LvdError as exc: print_error_and_exit(f'failed to resolve docroot for domain {domain!r}: {exc}') # CLOS-4402: ensure LVD proxyexec helpers are registered for callers # that skip the allow-domain-limits step (idempotent, no-op without CageFS). ensure_lvd_proxy_commands() lve_commands.enable_domain_lve(owner_uid, docroot) # CLOS-4370: enabling the first domain flips _is_domain_isolated_user # from False to True, so re-run lve_apply now to enter the per-domain # branch and seed lvp<uid> with the user's caps. Without this the LVP # stays uncapped until the next `lvectl set` / `apply` for the user. # Load reseller XML cfg too so a reseller user's limits derive from # their reseller's defaults rather than global defaults. lve_commands.get_XML_cfg() if lve_commands.lve.reseller_limit_supported(): lve_commands.get_XML_cfg(lvp_id=lve_commands.lve.lve2lvp(owner_uid)) lve_commands.lve_apply(owner_uid) lve_commands.write_effective_cache() send_json_ok() if command in ('disable-domain-limits',): executed = True check_support_domain_limits() if not arg: print_error_and_exit('Usage: lvectl disable-domain-limits <domain>') domain = arg owner_name = cpapi_domain_owner(domain) if not owner_name: print_error_and_exit(f'cannot determine owner of domain {domain!r} via panel API') owner_uid = pwd.getpwnam(owner_name).pw_uid try: docroot = resolve_docroot(domain) except LvdError as exc: print_error_and_exit(f'failed to resolve docroot for domain {domain!r}: {exc}') lve_commands.disable_domain_lve(owner_uid, docroot) # CLOS-4370: symmetric with enable-domain-limits — removing the last # domain flips _is_domain_isolated_user back to False, so re-run # lve_apply to drop the per-domain branch and re-apply user limits # on lve<uid> directly. # Load reseller XML cfg too so a reseller user's limits derive from # their reseller's defaults rather than global defaults. lve_commands.get_XML_cfg() if lve_commands.lve.reseller_limit_supported(): lve_commands.get_XML_cfg(lvp_id=lve_commands.lve.lve2lvp(owner_uid)) lve_commands.lve_apply(owner_uid) lve_commands.write_effective_cache() send_json_ok() if command == 'destroy-and-recreate-all': # NOTE(vlebedev): This is a workaround/hack to avoid the two-step process of first destroying all lves # and only then recreating them all with proper limits. This proofed to be problematic # due to the fact that destroy (and possibly create/apply) might hang indefinitely and # the server will be left with limits already reset for all but not yet re-applied for # some due to lvectl transitive hanging. # Technically, this is an equivalent of `lvectl destroy all` and `lvectl apply all` # executed sequentially, but in a single command and this additionanl safety net. executed = True lve_commands.lve_destroy_and_recreate_all() if lve_commands.lve.reseller_limit_supported(): lve_commands.lve.sync_map() lve_commands.write_effective_cache(reset=True) _wpos_reload() if command in ('destroy', '--destroy'): executed = True if len(arg) == 0: print_error_and_exit('destroy takes 2 arguments') if arg == 'default' or arg == '0': print_error_and_exit('cannot destroy default LVE') if arg == 'all': lve_commands.lve_destroy('all') else: lve_id = convert_to_int_or_exit(arg, 'BAD LVE ID') if lve_id > 0: try: lve_commands._reject_if_domain_lve_id(lve_id) except DomainLveIdError as e: print_error_and_exit(str(e)) lve_commands.lve_destroy(int(arg)) else: print_error_and_exit("Bad LVE ID") _wpos_reload() if command in ('delete', '--delete', 'remove-reseller'): executed = True lve_commands.get_global_lock(True) if len(arg) == 0 or arg == 'all': print_error_and_exit("wrong arguments for --delete") if arg == '0' or arg == 'default': print_error_and_exit("cannot delete default LVE") if command == 'remove-reseller': check_support_reseller_limits() lvp_id, reseller_name = parse_reseller(arg) lve_commands.disable_reseller_limits(reseller_name=reseller_name, lvp_id=lvp_id) send_json_ok() else: delete_lve(arg) # Not resetting because not all effective limits would be calculated during this # lvectl run, and write_effective_cache with reset replaces the cache file data with # those specifically. lve_commands.write_effective_cache() if command in ('delete-user', '--delete-user'): executed = True lve_commands.get_global_lock(True) delete_lve_by_name(arg) if command in ('--set',): executed = True print_usage() if command in ('--ubc', 'ubc'): executed = True print('UBC option is no longer available. If you would like to disable virtual memory limit,' ' please use --vmem=0 option') if command in ('--package-set',): # not accepted with dashes executed = True print_usage() # LU-400 # call custom script for Endurance than we set/delete limits for user if command in ('set', 'set-user', 'delete', 'delete-user', 'package-set', 'package-set-ext', 'package-delete'): if '--skip-custom' not in args: lve_commands.call_endurance_custom_script(args=args) if command in ('set', 'set-user'): executed = True lve_commands.get_global_lock(True) lve_set_data = process_lve_set(args, command) # We want to keep the effective limit cache matched to the ve.cfg file, # so if ve.cfg is not updated, neither should the cache. # "skip-update-cfg" might not be in the dict, so we get() if not lve_set_data.get('skip-update-cfg', False): lve_commands.write_effective_cache() if command in ('set-reseller', 'set-reseller-default'): executed = True check_support_reseller_limits() lve_commands.get_global_lock(True) lve_set_data = process_lve_set(args, command) if not lve_set_data.get('skip-update-cfg', False): lve_commands.write_effective_cache() if command in ('package-set',): executed = True lve_commands.get_global_lock(True) process_lve_package_set(args) lve_commands.write_effective_cache() if command in ('package-set-ext',): executed = True lve_commands.get_global_lock(True) process_lve_package_set(args, lve_command_func=lve_commands.package_set_ext) lve_commands.write_effective_cache() if command in ('package-delete', '--package-delete'): executed = True lve_commands.get_global_lock(True) if len(arg) == 0: print_error_and_exit("wrong arguments for delete command") reseller = [el for el in args if el.startswith("--reseller=")] if len(reseller) == 1: lve_commands.reseller_plan_delete(arg, reseller[0].split("=")[1]) else: lve_commands.plan_delete(arg) # lve_apply_all is called under the hood, so it's OK to reset the cache file after lve_commands.write_effective_cache(reset=True) send_json_ok() if command in ('package-list', '--package-list'): executed = True lve_commands.get_packages_list() if command in ('all-package-list',): executed = True lve_commands.get_all_packages_list() if command in ('all-user-list',): executed = True lve_commands.all_users_limits() if command in ('reseller-package-list', '--reseller-package-list'): executed = True lve_commands.get_resellers_packages_list() if not executed: print_error_and_exit('unknown or missing command', exit_code=1, print_usage_flag=True) if __name__ == "__main__": init_lve_utils_sentry_client('lvectl') try: main() except (NoSuchLvp, lveapi.PyLveError, CPAPIException) as e: print_error_and_exit(str(e), exit_code=1)