summaryrefslogtreecommitdiff
path: root/Userland/Applets/ResourceGraph/main.cpp
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2022-10-14 21:54:16 +0300
committerAndrew Kaster <andrewdkaster@gmail.com>2022-10-25 15:33:34 -0600
commit6e508573a0c1a3a3730bfeb0bc0ee06071f7248f (patch)
tree2eaaa7ed56fc003d525bdc710ea7a2c020c63946 /Userland/Applets/ResourceGraph/main.cpp
parentec96aee8e31e90ecd79f96e9afb85c0eaff0637a (diff)
downloadserenity-6e508573a0c1a3a3730bfeb0bc0ee06071f7248f.zip
Applets: Use new global variables at /sys/kernel/ directory
Diffstat (limited to 'Userland/Applets/ResourceGraph/main.cpp')
-rw-r--r--Userland/Applets/ResourceGraph/main.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Userland/Applets/ResourceGraph/main.cpp b/Userland/Applets/ResourceGraph/main.cpp
index b575c73576..59cf25a25e 100644
--- a/Userland/Applets/ResourceGraph/main.cpp
+++ b/Userland/Applets/ResourceGraph/main.cpp
@@ -162,7 +162,7 @@ private:
total = 0;
idle = 0;
- auto json = get_data_as_json(m_proc_stat, "/proc/stat"sv);
+ auto json = get_data_as_json(m_proc_stat, "/sys/kernel/stats"sv);
if (json.is_error())
return false;
@@ -174,7 +174,7 @@ private:
bool get_memory_usage(u64& allocated, u64& available)
{
- auto json = get_data_as_json(m_proc_mem, "/proc/memstat"sv);
+ auto json = get_data_as_json(m_proc_mem, "/sys/kernel/memstat"sv);
if (json.is_error())
return false;
@@ -196,7 +196,7 @@ private:
{
tx = rx = link_speed = 0;
- auto json = get_data_as_json(m_proc_net, "/proc/net/adapters"sv);
+ auto json = get_data_as_json(m_proc_net, "/sys/kernel/net/adapters"sv);
if (json.is_error())
return false;
@@ -291,9 +291,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(create_applet(GraphType::Network, network));
TRY(Core::System::unveil("/res", "r"));
- TRY(Core::System::unveil("/proc/stat", "r"));
- TRY(Core::System::unveil("/proc/memstat", "r"));
- TRY(Core::System::unveil("/proc/net/adapters", "r"));
+ TRY(Core::System::unveil("/sys/kernel/stats", "r"));
+ TRY(Core::System::unveil("/sys/kernel/memstat", "r"));
+ TRY(Core::System::unveil("/sys/kernel/net/adapters", "r"));
TRY(Core::System::unveil("/bin/SystemMonitor", "x"));
TRY(Core::System::unveil(nullptr, nullptr));