LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-03-2022, 02:40 AM   #1
rudra12ful
LQ Newbie
 
Registered: Aug 2022
Posts: 3

Rep: Reputation: 0
Post Direct I/O usage


Hi everyone i am trying to use direct I/O but have no idea for where to refer and how to use it can someone please help me with the material or a bit of refernce.

[links moderated]

added some links above trying to implement this and how to implement this in terminal

I am a beginner so have very less knowledge about it so any help is appreciated.

Last edited by astrogeek; 08-04-2022 at 12:38 PM. Reason: moderated links
 
Old 08-03-2022, 03:55 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,715
Blog Entries: 13

Rep: Reputation: 4770Reputation: 4770Reputation: 4770Reputation: 4770Reputation: 4770Reputation: 4770Reputation: 4770Reputation: 4770Reputation: 4770Reputation: 4770Reputation: 4770
Direct I/O usage

Quote:
Originally Posted by rudra12ful View Post
Hi everyone i am trying to use direct I/O but have no idea for where to refer and how to use it can someone please help me with the material or a bit of refernce.
Sorry. Your question is not clear enough. What do you mean by direct I/O? Is there a reference you can cite which explains better what you're trying to do? There are a lot of ways to perform I/O.

Last edited by rtmistler; 08-03-2022 at 08:14 AM.
 
Old 08-03-2022, 05:00 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 20,533

Rep: Reputation: 3889Reputation: 3889Reputation: 3889Reputation: 3889Reputation: 3889Reputation: 3889Reputation: 3889Reputation: 3889Reputation: 3889Reputation: 3889Reputation: 3889
Were I to be even the least bit cynical, I would have to say this seems like a bot. Not the least research has been done.
 
Old 08-03-2022, 07:32 AM   #4
rudra12ful
LQ Newbie
 
Registered: Aug 2022
Posts: 3

Original Poster
Rep: Reputation: 0
Post Direact I/O

[link moderated]

i want to implement the theory given in these links so wanted to know the method for implementation of Direct I/O or some reference for it. Or how can i use these commands in terminal; Really a ameature so any help is appreciated

Last edited by astrogeek; 08-04-2022 at 12:38 PM. Reason: links moderated
 
Old 08-03-2022, 08:30 AM   #5
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,715
Blog Entries: 13

Rep: Reputation: 4770Reputation: 4770Reputation: 4770Reputation: 4770Reputation: 4770Reputation: 4770Reputation: 4770Reputation: 4770Reputation: 4770Reputation: 4770Reputation: 4770
Quote:
Originally Posted by rudra12ful View Post
[link moderated]

i want to implement the theory given in these links so wanted to know the method for implementation of Direct I/O or some reference for it. Or how can i use these commands in terminal; Really a ameature so any help is appreciated
You're right about amateur, at least that first blog.

This is kernel and how it behaves. I'm sure you can find code there.

The guidance to use dd with the direct option is tip #1. The source for dd is available and likely you can view in that code exactly what it does for this type of mode.

Now, what's your need?

Storytelling: Ere long ago I had a process collecting long time job activity data, a lot of data. When done they wanted to dock the tool and grab the data ASAP. What they'd see was the file, but incomplete because it hadn't synced yet. The solution which worked was that the data was collected to a temporary file, when the job process completed, I forked a child to exec a rename to the intended record name, then exited that child process. The parent seeing the signal meant the file was now ready, for real. Because when a process terms, all open file handles must be resolved. Worked for me.

Last edited by astrogeek; 08-04-2022 at 12:39 PM. Reason: links moderated
 
1 members found this post helpful.
Old 08-03-2022, 01:31 PM   #6
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 10,636

Rep: Reputation: 5024Reputation: 5024Reputation: 5024Reputation: 5024Reputation: 5024Reputation: 5024Reputation: 5024Reputation: 5024Reputation: 5024Reputation: 5024Reputation: 5024
I found an example, right here on this forum:

https://www.linuxquestions.org/quest...3/#post3880522

Last edited by dugan; 08-03-2022 at 02:56 PM.
 
1 members found this post helpful.
Old 08-04-2022, 12:43 PM   #7
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 5,950
Blog Entries: 23

Rep: Reputation: 3937Reputation: 3937Reputation: 3937Reputation: 3937Reputation: 3937Reputation: 3937Reputation: 3937Reputation: 3937Reputation: 3937Reputation: 3937Reputation: 3937
Welcome to LQ and the Programming forum.

Please review the Site FAQ for guidance in asking well formed questions. Especially visit the link from that page, How to Ask Questions the Smart Way for discussion of things to consider when asking others for help.

Also, the forum rules do not permit advertising, which includes promotion of personal blogs and programming projects. Please visit http://www.linuxquestions.org/advertising/ for more information on advertising. Feel free to contact the forum admin if you have any questions about this policy. As the added, repeated links appear to be the main point of your posts they have been moderated as indicated.
 
  


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
direct rendering: Yes :: (but applications say direct rendering is not possible?) AbsoluteMonkey Fedora 0 12-16-2008 09:44 PM
getting realtime info on memory usage-cpu and harddrive usage steering Linux - Newbie 5 03-03-2005 08:43 PM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 04:45 AM
Controlling CPU usage & memory usage Saravana babu Linux - Software 0 02-18-2004 05:55 AM
Best way to ALOT of files in a direct to other direct? packman Linux - General 2 10-21-2002 07:31 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:03 AM.

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