Bombas fork

Un fork (bifurcación), en contexto de sistemas operativos es una especie de «clonación» de un proceso, en la cuál se copia a si mismo y se genera como proceso hijo, resultando dos procesos diferentes (padre e hijo).

Imaginemos ahora que cada proceso de esos hace un fork, y a su vez, cada uno de los resultantes hace otro fork, y así consecutivamente. Eso es lo que se llama una bomba fork, y puede realizarse escribiendo este simple comando:

:(){ :|:& };:

Como se comprenderá, esta acción es infinita (salvo que el sistema marque un límite de forks a realizar), por lo que terminará colapsando el sistema y bloqueándolo por completo, nada más introducir ese comando. Existen bombas forks para muchos otros sistemas o dispositivos, como por ejemplo, Windows.

NOTA: Cuidado. Este comando es peligroso y puede (de hecho, probablemente lo haga) bloquear tu sistema.

 

SATA 6Gb/s but current 3.0 Gb/s

root@test:/var/log# smartctl -a /dev/sdb | grep “SATA Version is:”
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s)
root@test:/var/log# hdparm -I /dev/sda

/dev/sda:

ATA device, with non-removable media
Model Number: WDC WD20EZRX-XXXXXXX
Serial Number: WD-WMC4MXXXXXXX
Firmware Revision: 80.00A80
Transport: Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
Standards:
Supported: 9 8 7 6 5
Likely used: 9
Configuration:
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63

CHS current addressable sectors: 16514064
LBA user addressable sectors: 268435455
LBA48 user addressable sectors: 3907029168
Logical Sector size: 512 bytes
Physical Sector size: 4096 bytes
device size with M = 1024*1024: 1907729 MBytes
device size with M = 1000*1000: 2000398 MBytes (2000 GB)
cache/buffer size = unknown
Nominal Media Rotation Rate: 5400
Capabilities:
LBA, IORDY(can be disabled)
Queue depth: 32
Standby timer values: spec’d by Standard, with device specific minimum
R/W multiple sector transfer: Max = 16 Current = 16
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* SMART feature set
Security Mode feature set
* Power Management feature set
* Write cache
* Look-ahead
* Host Protected Area feature set
* WRITE_BUFFER command
* READ_BUFFER command
* NOP cmd
* DOWNLOAD_MICROCODE
Power-Up In Standby feature set
* SET_FEATURES required to spinup after power up
SET_MAX security extension
* 48-bit Address feature set
* Device Configuration Overlay feature set
* Mandatory FLUSH_CACHE
* FLUSH_CACHE_EXT
* SMART error logging
* SMART self-test
* General Purpose Logging feature set
* 64-bit World wide name
* WRITE_UNCORRECTABLE_EXT command
* {READ,WRITE}_DMA_EXT_GPL commands
* Segmented DOWNLOAD_MICROCODE
* Gen1 signaling speed (1.5Gb/s)
* Gen2 signaling speed (3.0Gb/s)
* Gen3 signaling speed (6.0Gb/s)
* Native Command Queueing (NCQ)
* Host-initiated interface power management
* Phy event counters
* NCQ priority information
* unknown 76[15]
* DMA Setup Auto-Activate optimization
Device-initiated interface power management
* Software settings preservation
* SMART Command Transport (SCT) feature set
* SCT Write Same (AC2)
* SCT Features Control (AC4)
* SCT Data Tables (AC5)
unknown 206[12] (vendor specific)
unknown 206[13] (vendor specific)
unknown 206[14] (vendor specific)
Security:
Master password revision code = 65534
supported
not enabled
not locked
frozen
not expired: security count
supported: enhanced erase
286min for SECURITY ERASE UNIT. 286min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 50014ee003b8cfe8
NAA : 5
IEEE OUI : 0014ee
Unique ID : 003b8cfe8
Checksum: correct
root@test:/var/log# hdparm -I /dev/sdb

/dev/sdb:

ATA device, with non-removable media
Model Number: WDC WD20EZRX-XXXXXXX
Serial Number: WD-WMC1TXXXXXXX
Firmware Revision: 80.00A80
Transport: Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
Standards:
Supported: 9 8 7 6 5
Likely used: 9
Configuration:
Logical max current
cylinders 16383 16383
heads 16 16
sectors/track 63 63

CHS current addressable sectors: 16514064
LBA user addressable sectors: 268435455
LBA48 user addressable sectors: 3907029168
Logical Sector size: 512 bytes
Physical Sector size: 4096 bytes
device size with M = 1024*1024: 1907729 MBytes
device size with M = 1000*1000: 2000398 MBytes (2000 GB)
cache/buffer size = unknown
Capabilities:
LBA, IORDY(can be disabled)
Queue depth: 32
Standby timer values: spec’d by Standard, with device specific minimum
R/W multiple sector transfer: Max = 16 Current = 16
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* SMART feature set
Security Mode feature set
* Power Management feature set
* Write cache
* Look-ahead
* Host Protected Area feature set
* WRITE_BUFFER command
* READ_BUFFER command
* NOP cmd
* DOWNLOAD_MICROCODE
Power-Up In Standby feature set
* SET_FEATURES required to spinup after power up
SET_MAX security extension
* 48-bit Address feature set
* Device Configuration Overlay feature set
* Mandatory FLUSH_CACHE
* FLUSH_CACHE_EXT
* SMART error logging
* SMART self-test
* General Purpose Logging feature set
* 64-bit World wide name
* WRITE_UNCORRECTABLE_EXT command
* {READ,WRITE}_DMA_EXT_GPL commands
* Segmented DOWNLOAD_MICROCODE
* Gen1 signaling speed (1.5Gb/s)
* Gen2 signaling speed (3.0Gb/s)
* Gen3 signaling speed (6.0Gb/s)
* Native Command Queueing (NCQ)
* Host-initiated interface power management
* Phy event counters
* NCQ priority information
* unknown 76[15]
* DMA Setup Auto-Activate optimization
Device-initiated interface power management
* Software settings preservation
* SMART Command Transport (SCT) feature set
* SCT Write Same (AC2)
* SCT Features Control (AC4)
* SCT Data Tables (AC5)
unknown 206[7]
unknown 206[12] (vendor specific)
unknown 206[13] (vendor specific)
unknown 206[14] (vendor specific)
Security:
Master password revision code = 65534
supported
not enabled
not locked
frozen
not expired: security count
supported: enhanced erase
278min for SECURITY ERASE UNIT. 278min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 50014ee6adc9f730
NAA : 5
IEEE OUI : 0014ee
Unique ID : 6adc9f730
Checksum: correct
root@test:/var/log# hdparm -t /dev/sdb

/dev/sdb:
Timing buffered disk reads: 332 MB in 3.01 seconds = 110.38 MB/sec
root@test:/var/log# hdparm -t /dev/sda

/dev/sda:
Timing buffered disk reads: 412 MB in 3.00 seconds = 137.11 MB/sec
root@test:/var/log# hdparm -T /dev/sda

/dev/sda:
Timing cached reads: 9898 MB in 2.00 seconds = 4952.16 MB/sec
root@test:/var/log# hdparm -T /dev/sdb

/dev/sdb:
Timing cached reads: 9892 MB in 2.00 seconds = 4948.97 MB/sec
root@test:/var/log# hdparm -t /dev/sdb

/dev/sdb:
Timing buffered disk reads: 340 MB in 3.01 seconds = 113.03 MB/sec
root@test:/var/log# hdparm -t /dev/sda

/dev/sda:
Timing buffered disk reads: 412 MB in 3.00 seconds = 137.30 MB/sec
root@test:/var/log# hdparm -Q /dev/sda

/dev/sda:
queue_depth = 31
root@test:/var/log# hdparm -Q /dev/sdb

/dev/sdb:
queue_depth = 31
root@test:/var/log# hdparm -A /dev/sda

/dev/sda:
look-ahead = 1 (on)
root@test:/var/log# hdparm -A /dev/sdb

/dev/sdb:
look-ahead = 1 (on)
root@test:/var/log# hdparm -c /dev/sda

/dev/sda:
IO_support = 1 (32-bit)
root@test:/var/log# hdparm -c /dev/sdb

/dev/sdb:
IO_support = 1 (32-bit)