Solaris mdb magic: Difference between revisions

From Lolly's Wiki
Jump to navigationJump to search
m (Text replacement - "<source" to "<syntaxhighlight")
m (Text replacement - "[[Kategorie:" to "[[Category:")
Line 1: Line 1:
[[Kategorie:Solaris|Modular Debugger]]
[[Category:Solaris|Modular Debugger]]
=Verschiedene kleine mdb Tricks=
=Verschiedene kleine mdb Tricks=



Revision as of 03:40, 26 November 2021

Verschiedene kleine mdb Tricks

Memory usage

# echo ::memstat|mdb -k
Page Summary                Pages                MB  %Tot
------------     ----------------  ----------------  ----
Kernel                    2855874             11155   69%
Anon                        50119               195    1%
Exec and libs                4754                18    0%
Page cache                  22972                89    1%
Free (cachelist)            11948                46    0%
Free (freelist)           1221894              4773   29%

Total                     4167561             16279
Physical                  4078747             15932

Kernelparameter abfragen

Syntax: echo '<Parameter>/D' | mdb -k

# echo 'ncsize/D' | mdb -k
ncsize:
ncsize:         70485

Kernelparameter setzen

Syntax: echo '<Parameter>/W<Value>' | mdb -wk

# echo 'do_tcp_fusion/W0' | mdb -wk
do_tcp_fusion:  0               =       0x0

Inquiry strings in Solaris 11

<syntaxhighlight lang=bash>

  1. echo "::walk sd_state | ::grep '.!=0' | ::print struct sd_lun un_sd | ::print struct scsi_device sd_inq | ::print struct scsi_inquiry inq_vid inq_pid" | mdb -k

inq_vid = [ "VMware " ] inq_pid = [ "Virtual disk " ] inq_vid = [ "NECVMWar" ] inq_pid = [ "VMware SATA CD00" ] inq_vid = [ "VMware " ] inq_pid = [ "Virtual disk " ] </source>