A service of Daily Data, Inc.
Contact Form

User Tools

Site Tools


unix:freebsd:quick_tips

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
unix:freebsd:quick_tips [2019/09/21 22:44] rodolicounix:freebsd:quick_tips [2025/11/23 21:45] (current) rodolico
Line 10: Line 10:
  
 egrep '(ad|cd|da)[0-9]' /var/run/dmesg.boot | sort egrep '(ad|cd|da)[0-9]' /var/run/dmesg.boot | sort
 +</code>
 +
 +Or, simply run
 +<code bash>geom disk list</code>
 +
 +==== List USB devices ====
 +
 +<code bash>usbconfig</code>
 +
 +==== Format a Drive ====
 +
 +Following example will set up an empty drive (/dev/da23) with GPT as the schema and one slice (partition). The partition will have a label, //sneakernet//, then be formatted using ufs.
 +
 +When you label a slice, it can be found in /dev/gpt/ and mounted using that alias.
 +
 +<code bash>
 +# create the GPT schema
 +gpart create -s GPT da23
 +# show what is there (nothing yet)
 +gpart list /dev/da23
 +# add a new slice of type UFS, and give it a label, sneakernet
 +# use all of the available disk space for this (ie, only one slice)
 +gpart add -t freebsd-ufs -l sneakernet da23
 +# show what is up
 +gpart list /dev/da23
 +# format the partition with UFS
 +newfs /dev/da23p1
 +# it should now show up as an alias in /dev/gpt
 +ls /dev/gpt
 +# make a place to mount it
 +mkdir /mnt/sneakernet
 +# mount it
 +mount /dev/gpt/sneakernet /mnt/sneakernet
 +# unmount it
 +umount /mnt/sneakernet
 +# clean up
 +rmdir /mnt/sneakernet
 </code> </code>
  
 ===== Monitoring ===== ===== Monitoring =====
 +
 +==== CPU Temperatures ====
 +
 +Following command will show you the temperature of each core of a processor
 +<code bash>sysctl -a | grep temperature | grep cpu</code>
 +
 ==== iotop substitute ==== ==== iotop substitute ====
  
Line 23: Line 66:
 Under Linux, watch repeats a command over and over, so it is useful for monitoring long running processes. The FreeBSD command //cmdwatch// does the same thing, with the same flags. Under Linux, watch repeats a command over and over, so it is useful for monitoring long running processes. The FreeBSD command //cmdwatch// does the same thing, with the same flags.
  
-<code bash>cmdwatch zpool status</code>+<code bash>cmdwatch zpool iostat -v</code>
  
 ===== Package Management ===== ===== Package Management =====
unix/freebsd/quick_tips.1569123852.txt.gz · Last modified: 2019/09/21 22:44 by rodolico