> dstat -tdD total,sde 60
----system---- --dsk/sde----dsk/total-
time | read writ : read writ
05-01 10:32:47 | :
05-01 10:33:47 | 9896k 112k : 630M 833M
05-01 10:34:00 | 11M 0 : 660M 994M
Tuesday, January 5, 2021
Specific drive IO stats grouped per time
Friday, October 30, 2020
Check the open files limit and current for a process
> for p in $(pidof java); do printf "$p: "; ls -l /proc/$p/fd |wc -l; done
54055: 93
54008: 9
> for p in $(pidof java); do printf "$p: "; cat /proc/$p/limits |grep open; done
54055: Max open files 65536 65536 files
54008: Max open files 65536 65536 files
Friday, October 9, 2020
Compiler flags
want to find compiler flags supported by your CPU?
gcc -v -E -x c /dev/null -o /dev/null -march=native 2>&1 | grep /cc1
Saturday, August 8, 2020
LVM Raid10 on 4 HD with SSD cache
sdc/sdd are SSD, sde through sdh are 3TB HDD
vgcreate data_sata1 /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh
lvcreate --type raid10 -m 1 -i 2 --stripesize 1024k -l100%free -n plots data_sata1 /dev/sde /dev/sdf /dev/sdg /dev/sdh
lvcreate --type raid1 -m 1 -l 100%free -n cache data_sata1 /dev/sdc /dev/sdd
lvconvert --type cache --cachevol cache --cachemode writeback --chunksize 1024 data_sata1/plots
mkfs.xfs /dev/mapper/data_sata1-plots
Wednesday, July 29, 2020
LVM Looking up stripes and stripesize of logical volumes
data fedora_node-2 -wi-ao---- 400.00g linear 1 0
data fedora_node-2 -wi-ao---- 400.00g linear 1 0
root fedora_node-2 -wi-ao---- <33.45g linear 1 0
root fedora_node-2 -wi-ao---- <33.45g linear 1 0
swap fedora_node-2 -wi-ao---- 15.73g linear 1 0
plots scratch_nvme1 rwi-aor--- <1.82t raid,raid0 2 1.00m
plots scratch_sata1 rwi-aor--- 2.91t raid,raid0 4 1.00m
plots scratch_sata2 rwi-aor--- <1.46t raid,raid0 4 1.00m
Monday, July 13, 2020
Tuesday, June 23, 2020
Test if a mounted drive works with timeout
Find out to which HBA disks are connected to
/devices/pci0000:00/0000:00:03.2/0000:10:00.0/host10/port-10:0/end_device-10:0/target10:0:0/10:0:0:0/block/sdd
10:00.0 Serial Attached SCSI controller: Broadcom / LSI SAS3008 PCI-Express Fusion-MPT SAS-3 (rev 02)
Subsystem: Broadcom / LSI SAS9300-8i
Flags: bus master, fast devsel, latency 0, IRQ 152
I/O ports at d000 [size=256]
Memory at f6e40000 (64-bit, non-prefetchable) [size=64K]
Memory at f6e00000 (64-bit, non-prefetchable) [size=256K]
Expansion ROM at f6d00000 [disabled] [size=1M]
Capabilities: [50] Power Management version 3
Capabilities: [68] Express Endpoint, MSI 00
Capabilities: [a8] MSI: Enable- Count=1/1 Maskable+ 64bit+
Capabilities: [c0] MSI-X: Enable+ Count=96 Masked-
Capabilities: [100] Advanced Error Reporting
Capabilities: [1e0] Secondary PCI Express
Capabilities: [1c0] Power Budgeting <?>
Capabilities: [190] Dynamic Power Allocation <?>
Capabilities: [148] Alternative Routing-ID Interpretation (ARI)
Kernel driver in use: mpt3sas
Kernel modules: mpt3sas
/devices/pci0000:00/0000:00:01.2/0000:02:00.0/0000:03:0a.0/0000:0e:00.0/ata8/host7/target7:0:0/7:0:0:0/block/sdc
02:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Matisse Switch Upstream (prog-if 00 [Normal decode])
Flags: bus master, fast devsel, latency 0, IRQ 24
Bus: primary=02, secondary=03, subordinate=0e, sec-latency=0
I/O behind bridge: 0000f000-0000ffff [size=4K]
Memory behind bridge: f6200000-f69fffff [size=8M]
Prefetchable memory behind bridge: 00000000f2400000-00000000f2cfffff [size=9M]
Capabilities: [50] Power Management version 3
Capabilities: [58] Express Upstream Port, MSI 00
Capabilities: [a0] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1 Len=010 <?>
Capabilities: [270] Secondary PCI Express
Capabilities: [370] L1 PM Substates
Capabilities: [400] Data Link Feature <?>
Capabilities: [410] Physical Layer 16.0 GT/s <?>
Capabilities: [440] Lane Margining at the Receiver <?>
Kernel driver in use: pcieport
Thursday, May 28, 2020
Checking on how many USB root hosts exists in Nvidia Jetson Nano B01
Tuesday, May 26, 2020
Monday, May 25, 2020
Python 3.8 on Centos7
> yum -y install openssl-devel bzip2-devel libffi-devel wget
> cd /opt
> wget https://www.python.org/ftp/python/3.8.3/Python-3.8.3.tgz
> tar xvf Python-3.8.3.tgz
> cd Python-3.8.3/
> ./configure --enable-optimizations
> make altinstall
> python3.8 --version
Python 3.8.3