UNPKG

1.51 kBTypeScriptView Raw
1/**
2 * This file is part of the @egodigital/egoose distribution.
3 * Copyright (c) e.GO Digital GmbH, Aachen, Germany (https://www.e-go-digital.com/)
4 *
5 * @egodigital/egoose is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as
7 * published by the Free Software Foundation, version 3.
8 *
9 * @egodigital/egoose is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17/**
18 * Result of 'getDiskSpace()' function.
19 */
20export interface DiskSpaceResult {
21 /**
22 * The free space, in bytes.
23 */
24 free: number;
25 /**
26 * The total space, in bytes.
27 */
28 total: number;
29 /**
30 * The used space, in bytes.
31 */
32 used: number;
33}
34/**
35 * Returns the CPU usage in percentage.
36 *
37 * @return {Promise<number>} The promise with the CPU usage.
38 */
39export declare function getCpuUsage(): Promise<number>;
40/**
41 * Returns the diskspace of a mount point.
42 *
43 * @param {string} [mountPoint] The custom name / path of the endpoint to check.
44 *
45 * @return {Promise<DiskSpaceResult>} The promise with the result.
46 */
47export declare function getDiskSpace(mountPoint?: string): Promise<DiskSpaceResult>;