@@ -780,78 +780,70 @@ fn print_nvidia_details() {
780780 let nvml = match Nvml :: init ( ) {
781781 Ok ( nvml) => nvml,
782782 Err ( err) => {
783- debug ! ( "Nvidia, library init fail: {:?}" , err) ;
783+ error ! ( "Nvidia, library init fail: {:?}" , err) ;
784784 return ;
785785 }
786786 } ;
787787 // Get the first `Device` (GPU) in the system
788788 let device = match nvml. device_by_index ( 0 ) {
789789 Ok ( device) => device,
790790 Err ( err) => {
791- debug ! ( "Nvidia, device not found: {:?}" , err) ;
791+ error ! ( "Nvidia, device not found: {:?}" , err) ;
792792 return ;
793793 }
794794 } ;
795795
796796 println ! ( "NVIDIA GPU" ) ;
797- // GeForce
798- info ! ( " BRAND: {:?}" , device. brand( ) ) ;
799797 println ! (
800- " Name: {}" ,
798+ " Name: {}" ,
801799 device. name( ) . unwrap_or( "Unknown" . to_string( ) )
802800 ) ;
803- println ! ( " Architecture: {:?}" , device. architecture( ) ) ;
801+ println ! ( " Architecture: {:?}" , device. architecture( ) ) ;
804802 println ! (
805- " VBIOS Version: {}" ,
803+ " VBIOS Version: {}" ,
806804 device. vbios_version( ) . unwrap_or( "Unknown" . to_string( ) )
807805 ) ;
808806 println ! (
809- " INFO ROM Ver: {}" ,
807+ " INFO ROM Ver: {}" ,
810808 device
811809 . info_rom_image_version( )
812810 . unwrap_or( "Unknown" . to_string( ) )
813811 ) ;
814- println ! ( " PCI Info: {:X?}" , device. pci_info( ) ) ;
815- println ! ( " Performance State:{:?}" , device. performance_state( ) ) ;
812+ println ! ( " PCI Info: {:X?}" , device. pci_info( ) ) ;
813+ println ! ( " Performance State: {:?}" , device. performance_state( ) ) ;
816814 println ! (
817- " Pwr Mgmt Limit Df: {:?}mW" ,
815+ " Pwr Mgmt Limit Def: {:?}mW" ,
818816 device. power_management_limit_default( )
819817 ) ;
820- // NotSupported
821818 println ! (
822- " Pwr Mgmt Limit: {:?}mW" ,
819+ " Pwr Mgmt Limit: {:?}mW" ,
823820 device. power_management_limit( )
824821 ) ;
825822 println ! (
826- " Pwr Mgmt Limit Cs: {:?}" ,
823+ " Pwr Mgmt Limit Con: {:?}" ,
827824 device. power_management_limit_constraints( )
828825 ) ;
829- println ! ( " Pwr Usage: {:?}mW" , device. power_usage( ) ) ;
826+ println ! ( " Pwr Usage: {:?}mW" , device. power_usage( ) ) ;
830827 println ! (
831- " Total Energy: {:?}mJ" ,
828+ " Total Energy: {:?}mJ" ,
832829 device. total_energy_consumption( )
833830 ) ;
834- // 0/NotSupported right now
835- println ! ( " Serialnum: {:?}" , device. serial( ) ) ;
831+ println ! ( " Serial Number: {:?}" , device. serial( ) ) ;
836832 println ! (
837- " Throttle Reason: {:?}" ,
833+ " Throttle Reason: {:?}" ,
838834 device. current_throttle_reasons( )
839835 ) ;
840836 println ! (
841- " Temperature: {:?}C" ,
837+ " Temperature: {:?}C" ,
842838 device. temperature( TemperatureSensor :: Gpu )
843839 ) ;
844- //println!(" Temperature Thres:{:?}C", device.temperature_threshold());
845- println ! ( " Util Rate: {:?}" , device. utilization_rates( ) ) ;
846- println ! ( " Memory Info: {:?}" , device. memory_info( ) ) ;
847- // Not supported
848- println ! ( " Part Number: {:?}" , device. board_part_number( ) ) ;
849- println ! ( " Board ID: {:?}" , device. board_id( ) ) ;
850- // 0
851- println ! ( " Num Fans: {:?}" , device. num_fans( ) ) ;
852- // Works
853- println ! ( " Display Active?: {:?}" , device. is_display_active( ) ) ;
854- println ! ( " Display Conn?: {:?}" , device. is_display_connected( ) ) ;
840+ println ! ( " Util Rate: {:?}" , device. utilization_rates( ) ) ;
841+ println ! ( " Memory Info: {:?}" , device. memory_info( ) ) ;
842+ println ! ( " Part Number: {:?}" , device. board_part_number( ) ) ;
843+ println ! ( " Board ID: {:?}" , device. board_id( ) ) ;
844+ println ! ( " Num Fans: {:?}" , device. num_fans( ) ) ;
845+ println ! ( " Display Active?: {:?}" , device. is_display_active( ) ) ;
846+ println ! ( " Display Conn?: {:?}" , device. is_display_connected( ) ) ;
855847}
856848
857849fn print_esrt ( ) {
0 commit comments