wֶTddlZddlZddlmZmZGddejZddZdS)N)SmartFormattercheck_from_zero_to_max_intceZdZdZdS) ArgParseClTopc t|)N) ValueError)selfmessages /builddir/build/BUILDROOT/lve-stats-4.3.2-1.el9.x86_64/opt/cloudlinux/venv/lib/python3.11/site-packages/lvestats/lib/parsers/cloudlinux_top_argparse.pyerrorzArgParseClTop.errors!!!N)__name__ __module__ __qualname__r r r rrs#"""""r rcloudlinux_topc*d}ttd|}|ddtjdd|d d d d d |dd d d|}|ddt d|ddd|ddt d|ddtdd |d!d"|d#d$ |S)%Ncf|}|dvr|Stjd|d)N)cpu mysql_cpuiomysql_ioiopsepnprocpmem"z{" is an invalid; must be one of the available options: "cpu", "mysql_cpu", "io", "mysql_io", "iops", "ep", "nproc", "pmem")lowerargparseArgumentTypeError)value value_lowereds r check_orderz*cloudlinux_top_parser..check_ordersP a a a ,VEVVV r zl%(prog)s - Utility provides information about current MySQL and LVE usage of a running system in JSON format)formatter_class descriptionprogz-vz --versionz&show program's version number and exitversion)r'helpactionz-jz--json store_trueFzreturn data in JSON format)r)defaultr(z --hide-mysqlzdon't show MySQL related infoz-uz --usernameztshow data only for specific user, can be used to filter the output, returns users where username like "%%USERNAME%%")typer(z-rz--for-resellerz;get information only about specified reseller and his users)r(z-dz--domainzrshow data only for specific domain, can be used to filter the output, returns users where domain like "%%DOMAIN%%"z-mz--maxzPshow up to N records. If --max key is omitted, by default will show top 25 users)r,r+r(z-oz --order-byrzusort output by resourse usage, available options: "cpu", "mysql_cpu", "io", "mysql_io", "iops", "ep", "nproc", "pmem")rr add_argumentlvestats __version__add_mutually_exclusive_groupstrr)namer# cltop_parserexclusive_groups r cloudlinux_top_parserr6s   !&%  L  k$ 6   h|U )|U ,#??AAO   l@!     J! js<  g6 _ leS r )r)rr/#lvestats.lib.commons.argparse_utilsrrArgumentParserrr6rr r r9s|ZZZZZZZZ"""""H+""" 777777r