LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-22-2017, 04:30 PM   #1
HowieReese
LQ Newbie
 
Registered: Apr 2017
Distribution: CentOS
Posts: 4

Rep: Reputation: Disabled
How to find out how many file descriptors I am using?


Greetings. I learned how to use file descriptors but never seen a way to check how many I am using. Any help is great.
 
Old 04-22-2017, 05:50 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
https://unix.stackexchange.com/quest...g-lsof-command
 
Old 04-23-2017, 04:55 AM   #3
Jjanel
Member
 
Registered: Jun 2016
Distribution: any&all, in VBox; Ol'UnixCLI; NO GUI resources
Posts: 999
Blog Entries: 12

Rep: Reputation: 363Reputation: 363Reputation: 363Reputation: 363
You'll find some interesting 'stuff' from a web-search of: ls /proc/self/fd
(ulimit may also be semi-relevant) wiki here.
Great to see learning; best wishes & welcome to LQ!
 
1 members found this post helpful.
Old 04-23-2017, 05:24 AM   #4
HowieReese
LQ Newbie
 
Registered: Apr 2017
Distribution: CentOS
Posts: 4

Original Poster
Rep: Reputation: Disabled
I got the hint from one of the answers in the link. To see the current file descriptors that I imitated is:

ls -l /proc/PID/fd

To get the current PID of my session on the terminal is simply

echo $$

Thanks bigrigdriver for the link +1

Last edited by HowieReese; 04-23-2017 at 05:37 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
reading and writing to pipes, file descriptors, and file streams cmartin0 Programming 1 02-13-2012 03:03 AM
How to find File Descriptors Leak using Sys calls rheosiva Linux - General 0 03-31-2009 08:44 AM
File Descriptors matsko Linux - Software 2 04-24-2008 11:45 AM
How to find out the number of open file descriptors? skie_knite007 Programming 2 12-11-2005 10:23 PM
unix file descriptors versus c FILE pointers nodger Programming 9 11-25-2004 07:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration