473,563 Members | 2,697 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Newby: how to check if a module is loaded in linux

Hi,
I need to check if a kernel module is loaded on a linux box.My linux
version 2.6. If the module is not loaded, I need to load it. Should I
do that with a system command (modprobe) or is there a better way in C?

Insomniux

Mar 15 '06 #1
4 3459
insomniux wrote:
Hi,
I need to check if a kernel module is loaded on a linux box.My linux
version 2.6. If the module is not loaded, I need to load it. Should I
do that with a system command (modprobe) or is there a better way in C?


I'm sorry, but you appear to have posted this to the wrong newsgroup.

C cannot do this directly. C++ cannot do this directly.

Perhaps you intended to post this to a linux newsgroup?

I suspect that there are APIs for Linux that allow you to get that sort
of information.

OS specific information is not topical here.

Ben Pope
--
I'm not just a number. To many, I'm known as a string...
Mar 15 '06 #2
insomniux wrote:
I need to check if a kernel module is loaded on a linux box.My linux
version 2.6. If the module is not loaded, I need to load it. Should I
do that with a system command (modprobe) or is there a better way in C?


For C questions consider 'comp.lang.c' newsgroup. We here talk C++. They
are two different languages (if you didn't know). But for Linux-specific
questions (like the one you've asked here), please post to the newsgroup
'comp.os.linux. development.sys tem'.

V
--
Please remove capital As from my address when replying by mail
Mar 15 '06 #3
OK, sorry bothering you

Mar 16 '06 #4
insomniux wrote:
OK, sorry bothering you


No biggie, we're here to help, even if it only means to point you
to the right newsgroup.

V
--
Please remove capital As from my address when replying by mail
Mar 16 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
3809
by: Al Kolff | last post by:
Hi, Has anyone come across a utility to check the case of a filename versus a php page? I develop locally on a windows machine (Know Know) then upload to a Linux and everything works usually works fine. But I sure would like to eliminate this headache. -- God Bless you, Al Kolff
8
3937
by: Irmen de Jong | last post by:
What would be the best way, if any, to obtain the bytecode for a given loaded module? I can get the source: import inspect import os src = inspect.getsource(os) but there is no ispect.getbytecode() ;-)
6
1831
by: kimes | last post by:
I've just started digging into how python works.. I found that other mudules are clearly declared like one file per a module.. But the only os.path doesn't have their own file.. ye I know is has actually depending on os like in my case posixpath.. What I'd love to know is.. when I call import os.path.. how happened under the hood?
8
1818
by: Ask | last post by:
G'day All, Just thought I'd drop in and say hi. I'm new to Python, but old to software development. Python is one of the languages used in my new job, so I've just bought a book, read it, and downloaded Python; It's pretty good isn't it? It's particularly handy being able top run the same bytecode on different platforms.
3
16491
by: David T. Ashley | last post by:
Hi, Red Hat Enterprise Linux 4.X. I'm writing command-line PHP scripts for the first time. I get the messages below. What do they mean? Are these operating system library modules, or something in PHP that I don't have? Do I need to install more Linux packages? Or adjust PHP in some way?
0
1805
by: Terry Tang | last post by:
Hi There, We are extending Python interpreter to support special functions of our tools. What we did is to compile Python's source code (which is got from the an installation on a Linux environment for Python 2.3.3) and our extensions (C++ code) on Windows with Microsoft Visual C++ 6.0 compiler to generate the extended Python interpreter....
14
9003
by: Darren L. Weber | last post by:
I am trying to compile a utility to create .avi files. See http://cpbotha.net/im2avi I'm working on Debian etch (a mix of testing/unstable). dweber@dnlweber:~/im2avi-0.4$ g++ --version g++ (GCC) 4.0.4 20060507 (prerelease) (Debian 4.0.3-3) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying...
3
10059
by: geevaa | last post by:
Hi group, PHP Warning: Module 'readline' already loaded in Unknown on line 0 what this warning means? please help me by explaining
4
2168
by: rkmr.em | last post by:
Hi I have a function data, that I need to import from a file data, in the directory data If I do this from python interactive shell (linux fedora core 8) from dir /home/mark it works fine: cwd = data os.chdir(cwd) print os.getcwd()
0
7580
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8103
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6244
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5481
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5208
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3634
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3618
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.