Difference between revisions of "Windows kstat"

From OpenZFS on OS X
Jump to: navigation, search
(Created page with " == Windows kstat == '''kstat''' is the utility used on illumos to query the kernel for various statistics and detailed information. It performs more of less the same respon...")
 
m (ZFSin debug)
(6 intermediate revisions by one user not shown)
Line 11: Line 11:
  
 
You can also use it to set certain tunables in the kernel, for example:
 
You can also use it to set certain tunables in the kernel, for example:
 +
 +
=== Arc Max ===
 +
 +
'''It is now recommended that you use the [[Windows_Registry|Registry]] to set the ZFS tunables.'''
  
 
  To set max ARC size to 512 MiB:
 
  To set max ARC size to 512 MiB:
Line 19: Line 23:
 
A setting is not retained over reboot, and will need to be set each boot.  
 
A setting is not retained over reboot, and will need to be set each boot.  
 
(In the future, there will be something to handle this automatically)
 
(In the future, there will be something to handle this automatically)
 +
 +
=== HostID ===
 +
 +
The '''HostID''' on Windows is generated from the Software/Microsoft/Cryptography/MachineGuid and
 +
generally most users do not need to change it. However, should you want to set the '''HostID''' that
 +
ZFS uses, you can do so by running;
 +
 +
  kstat.exe -w zfs:0:tunable:hw_hostid=11223344
 +
 +
=== ZFSin debug ===
 +
 +
You can also ask the kernel to save the debug print buffer to disk.
 +
 +
  kstat.exe -w zfs:0:tunable:vnop_debug=1337
 +
 +
Will write the buffer to '''C:/Windows/debug/ZFSin.txt''' - if the directory exists.
 +
 +
See [[Windows_BSOD#Debug_Print_Buffer|Debug]] for more information on the debug buffer.

Revision as of 00:15, 12 July 2019

Windows kstat

kstat is the utility used on illumos to query the kernel for various statistics and detailed information. It performs more of less the same responsibly as /proc/ on Linux.

Simply run the command to dump everything:

kstat.exe
(output is large)

You can also use it to set certain tunables in the kernel, for example:

Arc Max

It is now recommended that you use the Registry to set the ZFS tunables.

To set max ARC size to 512 MiB:
kstat.exe -w zfs:0:tunable:zfs_arc_max=536870912

Dump the "zfs:0:tunable" sub-section to list the available knobs to fiddle with.

A setting is not retained over reboot, and will need to be set each boot. (In the future, there will be something to handle this automatically)

HostID

The HostID on Windows is generated from the Software/Microsoft/Cryptography/MachineGuid and generally most users do not need to change it. However, should you want to set the HostID that ZFS uses, you can do so by running;

 kstat.exe -w zfs:0:tunable:hw_hostid=11223344

ZFSin debug

You can also ask the kernel to save the debug print buffer to disk.

 kstat.exe -w zfs:0:tunable:vnop_debug=1337

Will write the buffer to C:/Windows/debug/ZFSin.txt - if the directory exists.

See Debug for more information on the debug buffer.