Linux: Difference between revisions

From DWIKI
Line 70: Line 70:


  dmidecode -t baseboard
  dmidecode -t baseboard


===rescan partition table===
===rescan partition table===
Partition(s) have been written, but we have been unable to inform the kernel of the change
  partprobe
  partprobe
  kpartx
  kpartx
partx -uv /dev/sdg
  echo 1 > /sys/block/sde/device/rescan
  echo 1 > /sys/block/sde/device/rescan
   echo "- - -" > /sys/class/scsi_host/host2/scan
   echo "- - -" > /sys/class/scsi_host/host2/scan

Revision as of 10:04, 14 May 2020

Linux is a free Unix-type operating system originally created by Linus Torvalds with the assistance of developers around the world. Developed under the GNU General Public License , the source code for Linux is freely available to everyone.

Links


Rescue CDs


Checking resources

*inxi
*http://www.slashroot.in/linux-system-io-monitoring

show what is doing most disk accesses

iotop 
glances

IO statistics

iostat
vmstat
dstat
ioping
atop

CPU usage etc

top
atop
htop
vtop
fio
pidstat

Administration

FAQ

check if virtual of physicalmachine

dmidecode -s system-manufacturer
virt-who


pam_succeed_if(sudo:auth): requirement "uid >= 1000" not met

Grow (GPT) last partition to max available

Where '3' is partition number

parted /dev/sdf resize 3 100%

No longer allowed?

gdisk

timestamp to human readable

date -d @1522142497

List hardware

  • lshw
  • dmidecode
  • lsusb
  • hwinfo
  • lspci
dmidecode -t baseboard


rescan partition table

Partition(s) have been written, but we have been unable to inform the kernel of the change

partprobe
kpartx
partx -uv /dev/sdg
echo 1 > /sys/block/sde/device/rescan
 echo "- - -" > /sys/class/scsi_host/host2/scan

Force reboot

I found sometimes 'reboot' and 'shutdown' don't work in virtual machines, in that case try:

#sync
echo s > /proc/sysrq-trigger
#optionally umount
echo u > /proc/sysrq-trigger
#reboot
echo b > /proc/sysrq-trigger

Mignight commander/dialog strange characters

Quick fix:

export LANG=en_US.ISO-8859-1

This probleem seems to be related to screen/su -