mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
Kernel+SystemMonitor: Log amounts of I/O per thread
This patch adds these I/O counters to each thread: - (Inode) file read bytes - (Inode) file write bytes - Unix socket read bytes - Unix socket write bytes - IPv4 socket read bytes - IPv4 socket write bytes These are then exposed in /proc/all and seen in SystemMonitor.
This commit is contained in:
@@ -53,6 +53,12 @@ HashMap<pid_t, CProcessStatistics> CProcessStatisticsReader::get_all()
|
||||
thread.inode_faults = thread_object.get("inode_faults").to_u32();
|
||||
thread.zero_faults = thread_object.get("zero_faults").to_u32();
|
||||
thread.cow_faults = thread_object.get("cow_faults").to_u32();
|
||||
thread.unix_socket_read_bytes = thread_object.get("unix_socket_read_bytes").to_u32();
|
||||
thread.unix_socket_write_bytes = thread_object.get("unix_socket_write_bytes").to_u32();
|
||||
thread.ipv4_socket_read_bytes = thread_object.get("ipv4_socket_read_bytes").to_u32();
|
||||
thread.ipv4_socket_write_bytes = thread_object.get("ipv4_socket_write_bytes").to_u32();
|
||||
thread.file_read_bytes = thread_object.get("file_read_bytes").to_u32();
|
||||
thread.file_write_bytes = thread_object.get("file_write_bytes").to_u32();
|
||||
process.threads.append(move(thread));
|
||||
});
|
||||
|
||||
@@ -78,4 +84,3 @@ String CProcessStatisticsReader::username_from_uid(uid_t uid)
|
||||
return (*it).value;
|
||||
return String::number(uid);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user