1 /*
2 * Copyright (c) 2006-2023, RT-Thread Development Team
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 *
6 * Change Logs:
7 * Date Author Notes
8 */
9
10 #include "proc.h"
11 #include "procfs.h"
12
13 #include <rthw.h>
14 #include <rtdbg.h>
15
16 #include <fcntl.h>
17 #include <errno.h>
18
19 #include <dfs_dentry.h>
20 #include <mm_page.h>
21
22
23 extern void rt_memory_info(rt_size_t *total,
24 rt_size_t *used,
25 rt_size_t *max_used);
26
single_show(struct dfs_seq_file * seq,void * data)27 static int single_show(struct dfs_seq_file *seq, void *data)
28 {
29 dfs_seq_printf(seq, "0.13 0.16 0.17 1/1035 380436\n");
30
31 return 0;
32 }
33
proc_loadavg_init(void)34 int proc_loadavg_init(void)
35 {
36 struct proc_dentry *dentry = proc_create_single_data("loadavg", 0, NULL, single_show, NULL);
37 proc_release(dentry);
38
39 return 0;
40 }
41 INIT_ENV_EXPORT(proc_loadavg_init);
42