IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
For now we just parse the CPU "time-spent" counters and calculate the
CPU usage of the whole system. As we do not want a total average we
use a state-full implementation, which calculates the usage since the
last request (if older than 1 second).
Somewhat modeled after our Perl version of this. But for the "total"
we do not use the:
> ($ctime - $last_proc_stat->{ctime}) * $clock_ticks * $cpucount;
calculation, but just add _all_ fields together, as that is the total
of CPU time.
Use a Reader-Writer lock to sync updating. First check under the
reader lock if the data is recent enough, else update it under the
writer lock.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
open(2) says file descriptors opened with O_PATH cannot be
passed to fchmod(), fchown(), etc.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Adapted from the integer schema, uses f64 type.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Cc: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Move API types into the router module and make router and
cli optional.
This way the 'router' module is the only thing with a
dependency on 'hyper', allowing the use of the schema alone
without pulling in the entire hyper stack.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
The function attribute reader doesn't read any other
attributes anymore, so make it reusable!
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This way we can just use `SOME_REGEX.is_match()` again
without having to explicitly call `(SOME_REGEX.regex_obj)()`
first.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Initially it was a wrapper around Ident to avoid some
copies, but now it's what we use to allow hyphenated names
for fields in objects (as `syn::Ident` doesn't allow that at
all), so give it a more fitting name.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
The user must always be explicit about whether the Ident or
the String is required, since they may differ.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>