/
Inventory.pm
1570 lines (943 loc) · 26.8 KB
/
Inventory.pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package FusionInventory::Agent::Task::Inventory::Inventory;
use strict;
use warnings;
use Config;
use Data::Dumper;
use Digest::MD5 qw(md5_base64);
use English qw(-no_match_vars);
use XML::TreePP;
use FusionInventory::Agent::Tools;
my %fields = (
ANTIVIRUS => [ qw/COMPANY NAME GUID ENABLED UPTODATE VERSION/ ],
BATTERIES => [ qw/CAPACITY CHEMISTRY DATE NAME SERIAL MANUFACTURER
VOLTAGE/ ],
CONTROLLERS => [ qw/CAPTION DRIVER NAME MANUFACTURER PCICLASS PCIID
PCISUBSYSTEMID PCISLOT TYPE REV/ ],
CPUS => [ qw/CACHE CORE DESCRIPTION MANUFACTURER NAME THREAD SERIAL
STEPPING FAMILYNAME FAMILYNUMBER MODEL SPEED ID EXTERNAL_CLOCK/ ],
DRIVES => [ qw/CREATEDATE DESCRIPTION FREE FILESYSTEM LABEL LETTER
SERIAL SYSTEMDRIVE TOTAL TYPE VOLUMN/ ],
ENVS => [ qw/KEY VAL/ ],
INPUTS => [ qw/NAME MANUFACTURER CAPTION DESCRIPTION INTERFACE LAYOUT
POINTINGTYPE TYPE/ ],
MEMORIES => [qw/CAPACITY CAPTION FORMFACTOR REMOVABLE PURPOSE SPEED
SERIALNUMBER TYPE DESCRIPTION NUMSLOTS MEMORYCORRECTION/ ],
MODEMS => [ qw/DESCRIPTION NAME/ ],
MONITORS => [ qw/BASE64 CAPTION DESCRIPTION MANUFACTURER SERIAL
UUENCODE/ ],
NETWORKS => [ qw/BSSID DESCRIPTION DRIVER FIRMWARE IPADDRESS IPADDRESS6
IPDHCP IPGATEWAY IPMASK IPMASK6 IPSUBNET IPSUBNET6
MANAGEMENT MANUFACTURER MACADDR MODEL MTU PCISLOT
PNPDEVICEID STATUS SLAVES SPEED SSID TYPE VIRTUALDEV
WWN/ ],
PORTS => [ qw/CAPTION DESCRIPTION NAME TYPE/ ],
PROCESSES => [ qw/USER PID CPUUSAGE MEM VIRTUALMEMORY TTY STARTED CMD/ ],
REGISTRY => [ qw/NAME REGVALUE HIVE/ ],
SLOTS => [ qw/DESCRIPTION DESIGNATION NAME STATUS/ ],
SOFTWARES => [ qw/COMMENTS FILESIZE FOLDER FROM HELPLINK INSTALLDATE NAME
NO_REMOVE RELEASE_TYPE PUBLISHER UNINSTALL_STRING
URL_INFO_ABOUT VERSION VERSION_MINOR VERSION_MAJOR
GUID ARCH/ ],
SOUNDS => [ qw/CAPTION DESCRIPTION MANUFACTURER NAME/ ],
STORAGES => [ qw/DESCRIPTION DISKSIZE INTERFACE MANUFACTURER MODEL NAME
TYPE SERIAL SERIALNUMBER FIRMWARE SCSI_COID SCSI_CHID
SCSI_UNID SCSI_LUN WWN/ ],
VIDEOS => [ qw/CHIPSET MEMORY NAME RESOLUTION PCISLOT/ ],
USBDEVICES => [ qw/VENDORID PRODUCTID SERIAL CLASS SUBCLASS NAME/ ],
USERS => [ qw/LOGIN DOMAIN/ ],
PRINTERS => [ qw/COMMENT DESCRIPTION DRIVER NAME NETWORK PORT RESOLUTION
SHARED STATUS ERRSTATUS SERVERNAME SHARENAME
PRINTPROCESSOR SERIAL/ ],
BIOS => [ qw/SMODEL SMANUFACTURER SSN BDATE BVERSION
BMANUFACTURER MMANUFACTURER MSN MMODEL ASSETTAG
ENCLOSURESERIAL BIOSSERIAL
TYPE SKUNUMBER/ ],
HARDWARE => [ qw/USERID OSVERSION PROCESSORN OSCOMMENTS CHECKSUM
PROCESSORT NAME PROCESSORS SWAP ETIME TYPE OSNAME
IPADDR WORKGROUP DESCRIPTION MEMORY UUID DNS
LASTLOGGEDUSER USERDOMAIN DATELASTLOGGEDUSER
DEFAULTGATEWAY VMSYSTEM WINOWNER WINPRODID
WINPRODKEY WINCOMPANY WINLANG CHASSIS_TYPE/ ],
OPERATINGSYSTEM => [ qw/KERNEL_NAME KERNEL_VERSION NAME VERSION FULL_NAME
SERVICE_PACK INSTALL_DATE/ ],
ACCESSLOG => [ qw/USERID LOGDATE/ ],
VIRTUALMACHINES => [ qw/MEMORY NAME UUID STATUS SUBSYSTEM VMTYPE VCPU
VMID MAC COMMENT OWNER/ ],
LOGICAL_VOLUMES => [ qw/LV_NAME VGN_AME ATTR SIZE LV_UUID SEG_COUNT
VG_UUID/ ],
PHYSICAL_VOLUMES => [ qw/DEVICE PV_PE_COUNT PV_UUID FORMAT ATTR
SIZE FREE PE_SIZE VG_UUID/ ],
VOLUME_GROUPS => [ qw/VG_NAME PV_COUNT LV_COUNT ATTR SIZE FREE VG_UUID
VG_EXTENT_SIZE/ ],
);
my %checks = (
STORAGES => {
INTERFACE => qr/^(SCSI|HDC|IDE|USB|1394|Serial-ATA|SAS)$/
},
VIRTUALMACHINES => {
STATUS => qr/^(running|idle|paused|shutdown|crashed|dying|off)$/
}
);
# convert fields list into fields hashes, for fast lookup
foreach my $section (keys %fields) {
$fields{$section} = { map { $_ => 1 } @{$fields{$section}} };
}
sub new {
my ($class, %params) = @_;
my $self = {
logger => $params{logger},
fields => \%fields,
content => {
HARDWARE => {
ARCHNAME => $Config{archname},
VMSYSTEM => "Physical" # Default value
},
VERSIONCLIENT => $FusionInventory::Agent::AGENT_STRING
}
};
bless $self, $class;
$self->setTag($params{tag});
$self->{last_state_file} = $params{statedir} . '/last_state'
if $params{statedir};
return $self;
}
sub getContent {
my ($self) = @_;
return $self->{content};
}
sub mergeContent {
my ($self, $content) = @_;
die "no content" unless $content;
foreach my $section (keys %$content) {
if (ref $content->{$section} eq 'ARRAY') {
# a list of entry
foreach my $entry (@{$content->{$section}}) {
$self->addEntry(section => $section, entry => $entry);
}
} else {
# single entry
SWITCH: {
if ($section eq 'HARDWARE') {
$self->setHardware($content->{$section});
last SWITCH;
}
if ($section eq 'BIOS') {
$self->setBios($content->{$section});
last SWITCH;
}
if ($section eq 'ACCESSLOG') {
$self->setAccessLog($content->{$section});
last SWITCH;
}
$self->addEntry(
section => $section, entry => $content->{$section}
);
}
}
}
}
sub addEntry {
my ($self, %params) = @_;
my $entry = $params{entry};
die "no entry" unless $entry;
my $section = $params{section};
my $fields = $fields{$section};
my $checks = $checks{$section};
die "unknown section $section" unless $fields;
foreach my $field (keys %$entry) {
if (!$fields->{$field}) {
# unvalid field, log error and remove
$self->{logger}->debug("unknown field $field for section $section");
delete $entry->{$field};
next;
}
if (!defined $entry->{$field}) {
# undefined value, remove
delete $entry->{$field};
next;
}
# sanitize value
my $value = getSanitizedString($entry->{$field});
# check value if appliable
if ($checks->{$field}) {
$self->{logger}->debug(
"invalid value $value for field $field for section $section"
) unless $value =~ $checks->{$field};
}
$entry->{$field} = $value;
}
# avoid duplicate entries
if ($params{noDuplicated}) {
my $md5 = md5_base64(Dumper($entry));
return if $self->{seen}->{$section}->{$md5};
$self->{seen}->{$section}->{$md5} = 1;
}
if ($section eq 'STORAGES') {
$entry->{SERIALNUMBER} = $entry->{SERIAL} if !$entry->{SERIALNUMBER}
}
push @{$self->{content}{$section}}, $entry;
}
sub computeLegacyValues {
my ($self) = @_;
# CPU-related values
my $cpus = $self->{content}->{CPUS};
if ($cpus) {
my $cpu = $cpus->[0];
$self->setHardware({
PROCESSORN => scalar @$cpus,
PROCESSORS => $cpu->{SPEED},
PROCESSORT => $cpu->{NAME},
});
}
# network related values
my $interfaces = $self->{content}->{NETWORKS};
if ($interfaces) {
my @ip_addresses =
grep { ! /^127/ }
grep { $_ }
map { $_->{IPADDRESS} }
@$interfaces;
$self->setHardware({
IPADDR => join('/', @ip_addresses),
});
}
# user-related values
my $users = $self->{content}->{USERS};
if ($users) {
my $user = $users->[-1];
my ($domain, $id);
if ($user->{LOGIN} =~ /(\S+)\\(\S+)/) {
# Windows fully qualified username: domain\user
$domain = $1;
$id = $2;
} else {
# simple username: user
$id = $user->{LOGIN};
}
$self->setHardware({
USERID => $id,
USERDOMAIN => $domain,
});
}
}
sub setHardware {
my ($self, $args) = @_;
foreach my $field (keys %$args) {
if (!$fields{HARDWARE}->{$field}) {
$self->{logger}->debug("unknown field $field for section HARDWARE");
next
}
$self->{content}->{HARDWARE}->{$field} =
getSanitizedString($args->{$field});
}
}
sub setOperatingSystem {
my ($self, $args) = @_;
foreach my $field (keys %$args) {
if (!$fields{OPERATINGSYSTEM}->{$field}) {
$self->{logger}->debug(
"unknown field $field for section OPERATINGSYSTEM"
);
next
}
$self->{content}->{OPERATINGSYSTEM}->{$field} =
getSanitizedString($args->{$field});
}
}
sub setBios {
my ($self, $args) = @_;
foreach my $field (keys %$args) {
if (!$fields{BIOS}->{$field}) {
$self->{logger}->debug("unknown field $field for section BIOS");
next
}
$self->{content}->{BIOS}->{$field} =
getSanitizedString($args->{$field});
}
}
sub setAccessLog {
my ($self, $args) = @_;
foreach my $field (keys %$args) {
if (!$fields{ACCESSLOG}->{$field}) {
$self->{logger}->debug(
"unknown field $field for section ACCESSLOG"
);
next
}
$self->{content}->{ACCESSLOG}->{$field} =
getSanitizedString($args->{$field});
}
}
sub setTag {
my ($self, $tag) = @_;
return unless $tag;
$self->{content}{ACCOUNTINFO} = [{
KEYNAME => "TAG",
KEYVALUE => $tag
}];
}
sub computeChecksum {
my ($self) = @_;
my $logger = $self->{logger};
# to apply to $checksum with an OR
my %mask = (
HARDWARE => 1,
BIOS => 2,
MEMORIES => 4,
SLOTS => 8,
REGISTRY => 16,
CONTROLLERS => 32,
MONITORS => 64,
PORTS => 128,
STORAGES => 256,
DRIVES => 512,
INPUT => 1024,
MODEMS => 2048,
NETWORKS => 4096,
PRINTERS => 8192,
SOUNDS => 16384,
VIDEOS => 32768,
SOFTWARES => 65536,
);
# TODO CPUS is not in the list
if ($self->{last_state_file}) {
if (-f $self->{last_state_file}) {
eval {
$self->{last_state_content} = XML::TreePP->new()->parsefile(
$self->{last_state_file}
);
}
} else {
$logger->debug(
"last state file '$self->{last_state_file}' doesn't exist"
);
}
}
my $checksum = 0;
foreach my $section (keys %mask) {
my $hash =
md5_base64(Dumper($self->{content}->{$section}));
# check if the section did change since the last run
next if
$self->{last_state_content}->{$section} &&
$self->{last_state_content}->{$section} eq $hash;
$logger->debug("Section $section has changed since last inventory");
# add the mask of the current section to the checksum
$checksum |= $mask{$section}; ## no critic (ProhibitBitwise)
# store the new value.
$self->{last_state_content}->{$section} = $hash;
}
$self->setHardware({CHECKSUM => $checksum});
}
sub saveLastState {
my ($self) = @_;
my $logger = $self->{logger};
if (!defined($self->{last_state_content})) {
$self->processChecksum();
}
if ($self->{last_state_file}) {
eval {
XML::TreePP->new()->writefile(
$self->{last_state_file}, $self->{last_state_content}
);
}
} else {
$logger->debug(
"last state file is not defined, last state not saved"
);
}
my $tpp = XML::TreePP->new();
}
1;
__END__
=head1 NAME
FusionInventory::Agent::Task::Inventory::Inventory - Inventory data structure
=head1 DESCRIPTION
This is a data structure corresponding to an hardware and software inventory.
=head1 METHODS
=head2 new(%params)
The constructor. The following parameters are allowed, as keys of the
%params hash:
=over
=item I<logger>
a logger object
=item I<statedir>
a path to a writable directory containing the last serialized inventory
=item I<tag>
an arbitrary label, used for server-side filtering
=back
=head2 getContent()
Get content attribute.
=head2 mergeContent($content)
Merge content to the inventory.
=head2 addEntry(%params)
Add a new entry to the inventory. The following parameters are allowed, as keys
of the %params hash:
=over
=item I<section>
the entry section (mandatory)
=item I<entry>
the entry (mandatory)
=item I<noDuplicated>
ignore entry if already present
=back
=head2 setTag($tag)
Set inventory tag, an arbitrary label used for filtering on server side.
=head2 setHardware()
Save global information regarding the machine.
=head2 setOperatingSystem()
Operating System information.
=head2 setBios()
Set BIOS informations.
=head2 setAccessLog()
What is that for? :)
=head2 computeChecksum()
Compute the inventory checksum. This information is used by the server to
know which parts of the inventory have changed since the last one.
=head2 computeLegacyValues()
Compute the inventory global values, meaning values in hardware section such as
CPU number, speed and model, computed from other values, but needed for OCS
compatibility.
=head2 saveLastState()
At the end of the process IF the inventory was saved
correctly, the last_state is saved.
=head1 DATA MODEL
This section presents the various entry types, with their attributes. The names
correspond to the historical OCS format.
=head2 BIOS
=over
=item SMODEL
System model
=item SMANUFACTURER
System manufacturer
=item SSN
System Serial number
=item BDATE
BIOS release date
=item BVERSION
The BIOS revision
=item BMANUFACTURER
BIOS manufacturer
=item MMANUFACTURER
Motherboard Manufacturer
=item MSN
Motherboard Serial
=item MMODEL
Motherboard model
=item ASSETTAG
=item ENCLOSURESERIAL
=item BIOSSERIAL
The optional asset tag for this machine.
=item TYPE
depcreated, replace by HARDWARE/CHASSIS_TYPE
=back
=head2 CONTROLLERS
=over
=item CAPTION
Windows CAPTION field or subsystem Name from the pci.ids table
=item DRIVER
=item NAME
The device name, the on from the PCIIDs DB
=item MANUFACTURER
The manifacturer name, the on from the PCIIDs DB
=item PCICLASS
The PCI class ID
=item PCIID
The PCI ID, e.g: 8086:2a40 (only for PCI device)
=item PCISUBSYSTEMID
The PCI subsystem ID, e.g: 8086:2a40 (only for PCI device)
=item PCISLOT
The PCI slot, e.g: 00:02.1 (only for PCI device)
=item TYPE
The controller revision, e.g: rev 02. This field may be renamed
in the future.
=item REV
Revision of the device in the XX format (e.g: 04)
=back
=head2 MEMORIES
=over
=item CAPACITY
=item CAPTION
E.g: Physical Memory
=item DESCRIPTION
=item FORMFACTOR
Only available on Windows, See Win32_PhysicalMemory documentation on MSDN.
=item REMOVABLE
=item PURPOSE
Only avalaible on Windows, See Win32_PhysicalMemory documentation on MSDN.
=item SPEED
In Mhz, e.g: 800
=item TYPE
=item NUMSLOTS
Eg. 2, start at 1, not 0
=item SERIALNUMBER
=back
=head2 CPUS
=over
=item CACHESIZE
The total CPU cache size in KB. e.g: 3072
=item CORE
Number of core.
=item DESCRIPTION
=item MANUFACTURER
AMD/Intel/Transmeta/Cyrix/VIA/Sun Microsystems//Fujitsu
=item NAME
The name of the CPU, e.g: Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz
=item THREAD
Number of thread per core.
=item SERIAL
Serial number
=item SPEED
Frequency in MHz
=item ID
The CPU ID: http://en.wikipedia.org/wiki/CPUID
=item STEPPING
Stepping value (Contained in CPUID)
=item MODEL
Model value (Contained in CPUID)
=item FAMILYNUMBER
Family value (Contained in CPUID)
=item FAMILYNAME
Family Name
=back
=head2 DRIVES
Drive is actually a filesystem. Virtual filesystem like /proc or /sys are ignored.
=over
=item CREATEDATE
Date of creation of the filesystem in DD/MM/YYYY format.
=item DESCRIPTION
=item FREE
Free space (MB)
=item FILESYSTEM
File system name. e.g: ext3
=item LABEL
Name of the partition given by the user.
=item LETTER
Windows driver letter. Windows only
=item SERIAL
Partition serial number or UUID
=item SYSTEMDRIVE
Boolean. Is this the system partition?
=item TOTAL
Total space available (MB)
=item TYPE
The mount point on UNIX.
=item VOLUMN
System name of the partition (e.g: /dev/sda1 or server:/directory for NFS)
=back
=head2 HARDWARE
=over
=item USERID
The current user list, '/' is the delimiter. This field is deprecated, you
should use the USERS section instead.
=item OSVERSION
Version number of the operating system. This field will be deprecated in the
future, please use OPERATINGSYSTEM/VERSION or OPERATINGSYSTEM/KERNEL_VERSION
instead.
=item PROCESSORN
=item OSCOMMENTS
Service Pack on Windows, kernel build date on Linux
=item CHECKSUM
Deprecated, OCS only.
=item PROCESSORT
Deprecated, OCS only.
=item NAME
=item PROCESSORS
The processor speed in MHz, this field is deprecated, see CPUS instead.
=item SWAP
The swap space in MB.
=item ETIME
The time needed to run the inventory on the agent side.
=item TYPE
=item OSNAME
Full name of the operating system as reported by itself. This field will be
deprecated in the future, please use OPERATINGSYSTEM/NAME or
OPERATINGSYSTEM/FULL_NAME instead.
=item IPADDR
=item WORKGROUP
=item DESCRIPTION
Computer description (Windows only so far)
=item MEMORY
Total system memory in MB
=item UUID
=item DNS
=item LASTLOGGEDUSER
The login of the last logged user.
=item USERDOMAIN
This field is deprecated, you should use the USERS section instead.
=item DATELASTLOGGEDUSER
=item DEFAULTGATEWAY
=item VMSYSTEM
The virtualization technology used if the machine is a virtual machine.
Can be:
=over 5
=item Physical: (default)
=item Xen
=item VirtualBox
=item Virtual Machine: Generic if it's not possible to correctly identify the solution
=item VMware: ESX, ESXi, server, etc
=item QEMU
=item SolarisZone
=item VServer
=item OpenVZ
=item BSDJail
=item Parallels
=item Hyper-V
=back
=item WINOWNER
=item WINPRODID
=item WINPRODKEY
=item WINCOMPANY
=item WINLANG
Language code of the Windows
=item CHASSIS_TYPE
The computer chassis format (e.g: Notebook, Laptop, Server, etc)
=back
=head2 OPERATINGSYSTEM
=over
=item KERNEL_NAME
The name of the kernel used by this operating system, e.g freebsd, linux, hpux,
win32, etc (linux for android).
=item KERNEL_VERSION
Version of the operating system's kernel, e.g 2.6.32 for Linux, 5.2.x.y on
Windows Server 2003, etc.
=item NAME
Name of the Operating System ("Distributor ID" in LSB terms), e.g Debian,
Ubuntu, CentOS, SUSE LINUX, Windows, MacOSX, FreeBSD, AIX, Android, etc.
=item VERSION
Version of the operating system distribution ("Release" in LSB terms), e.g 11.04
on Ubuntu natty, 5.0.8 on Debian Lenny, 5.4 on CentOS 5.4, 2003 for Windows
Server 2003, etc.
=item FULL_NAME
Full name of the operating system as reported by itself, e.g "Debian GNU/Linux
unstable (sid)" or "Microsoft(R) Windows(R) Server 2003, Enterprise Edition
x64". This is also contained in the HARDWARE/OSNAME field which will be
deprecated in the future.
=item SERVICE_PACK
The Service Pack level reported by the operating system. This field is only
present on systems which use this notion.
=item INSTALL_DATE
The operating system installation date.
=back
=head2 MONITORS
=over
=item BASE64
The uuencoded EDID trame. Optional.
=item CAPTION
=item DESCRIPTION
=item MANUFACTURER
The manufacturer retrieved from the EDID trame.
=item SERIAL
The serial number retrieved from the EDID trame.
=item UUENCODE
The uuencoded EDID trame. Optional.
=back
=head2 PORTS
Serial, Parallel, SATA, etc
=over
=item CAPTION
=item DESCRIPTION
=item NAME
=item TYPE
=back
=head2 SLOTS
Represents physical connection points including ports, motherboard slots and peripherals, and proprietary connection points.
This information is hardly reliable.
=over
=item CAPACITY
=item CAPTION
=item FORMFACTOR
=item REMOVABLE
=item PURPOSE
=item TYPE
=item DESCRIPTION
=back
=head2 STORAGES
=over
=item DESCRIPTION