Zum Hauptinhalt springen
Intelligence View
⚡ tsecurity.de Intelligence

linux local system locks

The lslk(8) program has been unmaintained and deprecated for over a decade now, since 2001. I've recently rewritten the tool, now called lslocks(8) that allows…

Beitrag
0
Seite
0
↗ Quelle (blog.stgolabs.net)
Cloud & Tech-Stack · 2 Min. Lesezeit
Quelle: blog.stgolabs.net
Rubrik: Unix & Linux Server



The lslk(8) program has been unmaintained and deprecated for over a decade now, since 2001.  I've recently rewritten the tool, now called lslocks(8) that allows an easier and up-to-date way of seeing all the current file held locks in a Linux system. This program will be shipping soon with standard system tools and available in your favorite distribution.





Some important modifications include removing legacy Unix outputs and options, for example:





  • Don't output inode number, whence and maj:min device numbers.

  • Don't provide nonblocking syscall options stat(2) and readlink(2). 


    • The option to use nonblocking calls was previously intended for NFS partitions; however this should be transparent to utility programs considering that timeouts can occur generically in any context (fuse - sshfs, NFS, netdevs, etc).





The command itself is quite straightforward - KISS:





 $> lslocks   
COMMAND PID TYPE SIZE MODE M START END PATH
smbd 1379 POSIX 5B WRITE 0 0 0 /var/run/samba/smbd.pid
smbd 1379 POSIX 696B READ 0 4 4 /var/run/samba/messages.tdb
...
smbd 1379 POSIX 696B READ 0 4 4 /var/run/samba/gencache_notrans.tdb
smbd 1513 POSIX 696B READ 0 4 4 /var/run/samba/messages.tdb
(unknown) 1717 FLOCK 0B WRITE 0 0 0 /var/run
atd 1793 POSIX 5B WRITE 0 0 0 /var/run/atd.pid
sendmail-mta 2004 POSIX 52B WRITE 0 0 0 /var/run/sendmail/mta/sendmail.pid
nmbd 2292 POSIX 5B WRITE 0 0 0 /var/run/samba/nmbd.pid
nmbd 2292 POSIX 696B READ 0 4 4 /var/run/samba/messages.tdb
nmbd 2292 POSIX 108K READ 0 4 4 /var/run/samba/connections.tdb
cat 3221 POSIX 0B WRITE 0 0 0 /home/dave/.local/share/zeitgeist/fts.index/flintlock
zeitgeist-daemo 3211 POSIX 989K WRITE 0 1073741824 1073742335 /home/dave/.local/share/zeitgeist/activity.sqlite
chromium-browse 4306 POSIX 202K WRITE 0 1073741824 1073742335 /home/dave/.config/chromium/Default/Web Data
...







We can quickly see the command name and PID that currently cause a lock to be held, as well as its size and canonical path. The lock itself, can be  FLOCK (created with flock(2)) or POSIX (created with fcntl(2) and lockf(2)) - I won't go over explaining the differences as it's not in the context of this post. The start and end are the relative byte offset of the lock.







Enjoy!

Social ReaktionenReagiere als Erste:r — dein Feedback zählt!
Informations-Bewertung:
✏️ Information ergänzen
🛡️ Versioniert via CMS-Revisions-Engine (Freigabe-Queue für Gäste)

💬 Communitydiscussie & reacties

🌐 Naar de hoofdchat

Start de discussie in de Social Chat broadcaststream of dien hierboven een vakbijdrage in via het aanvulformulier.

Security Briefing Gratis · 1-klik uitschrijven

Intelligence Digest gratis

Dagelijks het belangrijkste beveiligingsnieuws · kan op elk moment worden opgehaald

Community Rating & Social Proof
⭐ Lezersbeoordeling
–
Ø / 5.0
Nog geen recensies van lezers
Was dit artikel nuttig?
0
Geef uw beoordeling
Detailbeoordeling (optioneel)
Inhoud & Kwaliteit
Bron & Geloofwaardigheid
Actualiteit

Verwant Story Cluster & Sources (vector AI)

6 Cluster
26 Bronnen
Black Friday Oura Ring deals: The best of the deals so far, picked by a wearable-tech expert
Latest from TechRadar 33 min. geleden
25 andere bronnen
CNET6 jaar geledenOur Favorite Blenders of 2026 Are on Sale Ahead of Black Friday CNET37 min. geledenBrighten Up Your Day by Saving 20% Off Flashlights With Olight’s Black Friday Sale CNET29 min. geledenLive: Black Friday Deals Are Here. Shop Expert Picks Across Tech, Everyday Essentials and More at Up to 60% Off Golem.de43 min. geledenAnzeige: Logitech-Tastatur MX Keys S am Black Friday zum Sensationspreis auf Amazon PC-WELT55 min. geledenLuminar zum Black Friday: KI-Bildbearbeitung für nur 79,20 Euro Latest from TechRadar1 uur geledenThis is the pair of open earbuds to hunt down over Black Friday Latest from TechRadar1 uur geledenBest AirPods Black Friday deals: all live savings on AirPods Pro 3 and more Computer Bild1 uur geledenPhilips Sonicare DiamondClean 9000 zum Black Friday günstiger netzwelt.de2 uur geledenESR startet mit Black-Friday-Rabatten: Diese AirPods-Hüllen lohnen sich jetzt netzwelt.de2 uur geledenPlayStation 5 geschenkt: Diese Black-Friday-Aktion legt die Konsole gratis obendrauf netzwelt.de2 uur geleden6 Dyson-Staubsauger im Vergleich: Dieser Sauger wird am Black Friday überraschend zum Preis/Leistungssieger netzwelt.de1 uur geledenMonitore im Angebot zum Black Friday: Gutes Bild für Office, Gaming und mehr Golem.de1 uur geledenAnzeige: Akkuschrauber mit 20 Bits zum Black Friday erstmals unter 50 Euro bei Amazon PC-WELT1 uur geledenDie günstigsten Handytarife an Black Friday von 10 GB bis Unlimited: Hier lohnt sich ein Wechsel PC-WELT1 uur geledenBlack Friday 2026 bei LiberNovo: Ergonomische Bürostühle mit bis zu 44 Prozent Rabatt Latest from TechRadar1 uur geledenThe best Black Friday robot vacuum deals: Dreame, Shark, Dyson, and Roborock Golem.de1 uur geledenAnzeige: Topdon-Starthilfe-Powerbank für Kfz zum Black-Friday-Bestpreis nur rund 85 Euro heise online News2 uur geledenBlack Friday: Die besten Kopfhörer zum Tiefstpreis – Sonos Ace, Nothing & Shokz Latest from Windows Central2 uur geledenDell's Black Friday deals drop major savings on Alienware OLED monitors CNET2 jaar geledenMake Every Night Game Night and Save $90 on the Nex Playground With This Black Friday Deal DEV Community1 uur geledenThe app is part of the gadget: 14,000 App Store reviews of 28 device apps before Black Friday Latest from TechRadar2 uur geledenBlack Friday tech deals under $100 / £100: Fire TV Sticks, earbuds, coffee machines and more Caschys Blog3 uur geledenGoogle One: Black-Friday-Angebot mit bis zu 50 Prozent Rabatt netzwelt.de3 uur geledenDem Testsieger ebenbürtig: Zum Black Friday stürzt Xiaomis stärkster E-Scooter im Preis ab Macerkopf.de3 uur geledenFotos verbessern mit Aiarty: 52 % Rabatt + Gratisgeschenke zum Black Friday
Soortgelijke bijdragen
🔍 Verwandte News

Auch interessante Nachrichten linux local system locks

Thematisch verwandte Begriffe: linux, local, system, locks · 6 Treffer

Laden...

Video's zijn geladen...

Laden...

Bijdragen zijn geladen ...

Laden...

Video's zijn geladen...

Laden...

Bijdragen zijn geladen ...

Laden...

Video's zijn geladen...

Laden...

Bijdragen zijn geladen ...

Laden...

Video's zijn geladen...

Laden...

Bijdragen zijn geladen ...

Laden...

Video's zijn geladen...

💬 Reacties worden geladen…
Trek om te vernieuwen
Widgets & Topics
Loading widgets…
Nächster Beitrag