@@ -28,12 +28,14 @@ fn do_show_system(
28
28
let ( model, sockets, cores_per_socket, threads_per_core) = procfs:: get_cpu_info ( fs) ?;
29
29
let mem_by = procfs:: get_memtotal_kib ( fs) ? * 1024 ;
30
30
let mem_gib = ( mem_by as f64 / GIB as f64 ) . round ( ) as i64 ;
31
- let mut cards = match gpu:: probe ( ) {
32
- Some ( device) => match device. get_configuration ( ) {
33
- Ok ( cards) => cards,
34
- Err ( _) => vec ! [ ] ,
35
- }
36
- None => vec ! [ ]
31
+ let ( mut cards, manufacturer) = match gpu:: probe ( ) {
32
+ Some ( device) =>
33
+ ( match device. get_configuration ( ) {
34
+ Ok ( cards) => cards,
35
+ Err ( _) => vec ! [ ] ,
36
+ } ,
37
+ device. get_manufacturer ( ) ) ,
38
+ None => ( vec ! [ ] , "UNKNOWN" . to_string ( ) )
37
39
} ;
38
40
let hostname = hostname:: get ( ) ;
39
41
let ht = if threads_per_core > 1 {
@@ -98,6 +100,7 @@ fn do_show_system(
98
100
max_ce_clock_mhz,
99
101
max_mem_clock_mhz,
100
102
} = c;
103
+ let manufacturer = util:: json_quote ( & manufacturer) ;
101
104
let bus_addr = util:: json_quote ( bus_addr) ;
102
105
let model = util:: json_quote ( model) ;
103
106
let arch = util:: json_quote ( arch) ;
@@ -106,7 +109,7 @@ fn do_show_system(
106
109
gpu_info += & format ! (
107
110
r###"
108
111
{{"bus_addr":"{bus_addr}", "index":{index}, "uuid":"{uuid}",
109
- "model":"{model}", "arch":"{arch}", "driver":"{driver}", "firmware":"{firmware}",
112
+ "manufacturer":"{manufacturer}", " model":"{model}", "arch":"{arch}", "driver":"{driver}", "firmware":"{firmware}",
110
113
"mem_size_kib":{mem_size_kib},
111
114
"power_limit_watt":{power_limit_watt}, "max_power_limit_watt":{max_power_limit_watt}, "min_power_limit_watt":{min_power_limit_watt},
112
115
"max_ce_clock_mhz":{max_ce_clock_mhz}, "max_mem_clock_mhz":{max_mem_clock_mhz}}}"###
0 commit comments