Skip to content

Commit

Permalink
Segregate host, cpu, mem info in process state
Browse files Browse the repository at this point in the history
  • Loading branch information
yashanand1910 committed Dec 21, 2024
1 parent ea75f9d commit 156fdfc
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 44 deletions.
2 changes: 1 addition & 1 deletion cedana/daemon/daemon.proto
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ message DeleteResp {
message Job {
string JID = 1;
string Type = 2;
ProcessState Process = 3;
ProcessState State = 3;
repeated Checkpoint Checkpoints = 4;
bool GPUEnabled = 5;
string Log = 6;
Expand Down
31 changes: 31 additions & 0 deletions cedana/daemon/host.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
syntax = "proto3";

package daemon;

message Host {
string ID = 1;
string Hostname = 2;
string OS = 3;
string Platform = 4;
string KernelVersion = 5;
string KernelArch = 6;
string VirtualizationSystem = 7;
string VirtualizationRole = 8;

CPU CPU = 9;
Memory Memory = 10;
}

message CPU {
int32 Count = 1;
int32 CPU = 2;
string VendorID = 3;
string Family = 4;
string PhysicalID = 5;
}

message Memory {
uint64 Total = 1;
uint64 Available = 2;
uint64 Used = 3;
}
57 changes: 14 additions & 43 deletions cedana/daemon/process.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ syntax = "proto3";

package daemon;

import "daemon/host.proto";

message Process {
uint32 PID = 1;

Expand All @@ -19,59 +21,28 @@ message ProcessState {
uint32 PID = 1;
string Task = 2;
uint64 StartTime = 3; // in Unix milliseconds
ProcessInfo Info = 4;
HostInfo HostInfo = 5;
CPUInfo CPUInfo = 6;
MemoryInfo MemoryInfo = 7;
repeated uint32 UIDs = 8;
repeated uint32 GIDs = 9;
repeated uint32 Groups = 10;
uint32 SID = 11;
}

message ProcessInfo {
uint32 PID = 1;
bool AttachedToHardwareAccel = 2;
repeated OpenFilesStat OpenFiles = 3;
string WorkingDir = 4;
repeated ConnectionStat OpenConnections = 5;
float MemoryPercent = 6;
bool IsRunning = 7;
string Status = 8;
}
repeated File OpenFiles = 4;
repeated Connection OpenConnections = 5;
string WorkingDir = 6;
string Status = 7;
float MemoryPercent = 8;

message HostInfo {
string HostID = 1;
string Hostname = 2;
string OS = 3;
string Platform = 4;
string KernelVersion = 5;
string KernelArch = 6;
string VirtualizationSystem = 7;
string VirtualizationRole = 8;
}

message CPUInfo {
int32 Count = 1;
int32 CPU = 2;
string VendorID = 3;
string Family = 4;
string PhysicalID = 5;
}
Host Host = 9;

message MemoryInfo {
uint64 Total = 1;
uint64 Available = 2;
uint64 Used = 3;
repeated uint32 UIDs = 10;
repeated uint32 GIDs = 11;
repeated uint32 Groups = 12;
uint32 SID = 13; // session ID
}

message OpenFilesStat {
message File {
string Path = 1;
uint64 Fd = 2;
string Mode = 3;
}

message ConnectionStat {
message Connection {
uint32 Fd = 1;
uint32 Family = 2;
uint32 Type = 3;
Expand Down

0 comments on commit 156fdfc

Please sign in to comment.