[−][src]Struct procshot_server::Config
Config struct holds the user input when running the server. It is a bad design to hold the client's option as well in the same struct, but as of now, it is here.
Fields
hostname: String
hostname of the server. This is derived by this crate from the hostname crate.
delay: u64
Delay decides how many seconds to sleep after each iteration of scanning /proc
server: bool
If true, runs as server. Defaults to false. Pass the subcommand server
to set it to true.
client_time_from: String
The time from which the client can fetch data to process.
client_sort_by: String
Sort the processed data by whatever the user wants.
Methods
impl Config
[src]
Returns a new config object. This also gives the following command line argument options.
Examples
Here are the cli options used to populate the struct.
sudo target/debug/procshot --help
procshot 1.0
nohupped@gmail.com
Snapshots proc periodically. All the options except delay works when 'server' option is not used.
USAGE:
procshot [FLAGS] [OPTIONS] [SUBCOMMAND]
FLAGS:
-h, --help Prints help information
-o Sort result by Memory or CPU. Accepted values are...
-t Read stats from a specific time. Accepted format: 2015-09-05 23:56:04
-V, --version Prints version information
OPTIONS:
-d, --delay <delay> Sets delay in seconds before it scans /proc every time. [default: 60]
SUBCOMMANDS:
help Prints this message or the help of the given subcommand(s)
server Decides whether to run as server or client
Trait Implementations
Auto Trait Implementations
impl Unpin for Config
impl Sync for Config
impl Send for Config
impl RefUnwindSafe for Config
impl UnwindSafe for Config
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,