06-14-2012
call program
I would need to call the program 'ethtool' in my C++ program, does anyone know how to do that (if its even possible)?
10 More Discussions You Might Find Interesting
1. Linux
Hi,
I am new to Linux programming. As part of learning, I need to create a *.c program where we call certain /proc files (i.e. such as meminfo, version, uptime, etc...) from our program. Can anyone point me to a simple program on how one would do this (i.e. can you directly call uptime() or... (4 Replies)
Discussion started by: pat_and_cami
4 Replies
2. Shell Programming and Scripting
Hi Friends,
Could you pleas help me out..
I have an awk program which works fine while running it in the command prompt.
The awk program is
===============
awk 'BEGIN {
format="head -%d M2_Sales_N01.txt |tail -%d >M2_Sales_N01_%02d.txt\n"
n=0
m=0
}
{
if (n==0)
{
tmp=$1
n=1
}... (5 Replies)
Discussion started by: bikas_jena
5 Replies
3. Shell Programming and Scripting
Hi,
I would like to know how to call a program "cmp_size" ... where to put in progam to run it
ex: program checkdisk is below, and it will call a nother problem "cmp_size"
Do I just put the cmp_size program at the end of this program.
Thank you very much,
# check all directory for size... (3 Replies)
Discussion started by: xitrum
3 Replies
4. Shell Programming and Scripting
Hi,
Could anybody please let me know how to call a C_Program
from shell script. I know through command "system" we can call
shell script from C program.
Awaiting response.
Thanks and regards,
Chanakya M (4 Replies)
Discussion started by: Chanakya.m
4 Replies
5. Programming
hi guys
i have only basic knowledge of c so guys plz help me .....
i want 2 call c executable which requires file name as argument and i need to modify file contents before calling that executable now my question is how can i call this c executable inside another c program with arguments ??
i... (9 Replies)
Discussion started by: zedex
9 Replies
6. Programming
Dear all,
Currently I'm working on a C program (OS = ubuntu 9.0.4)in which a USB key will
be mounted and umounted for several times. I read the man page
of the mount system call.
I use the following test code
#include <sys/mount.h>
int main(int argc, char *argv)
{
if... (5 Replies)
Discussion started by: dariyoosh
5 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have to run two commands one after another from a c program. How can i do this with exec system calls. i tried giving them as argument to execv but it is not working.please help
thanks (3 Replies)
Discussion started by: suryashikha
3 Replies
8. Shell Programming and Scripting
Is it possible to call a mainframe program in UNIX script. I am using HP-UNIX. If so can any let me know the way to do it. (1 Reply)
Discussion started by: atlantis
1 Replies
9. Shell Programming and Scripting
How to call a stored procedure from shell program (1 Reply)
Discussion started by: noorm
1 Replies
10. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
"Your a7.c program should use printf to print a nice message. (You can decide what to say.) Then the process... (9 Replies)
Discussion started by: miniviking10
9 Replies
LEARN ABOUT LINUX
ifplugstatus
ifplugstatus(8) System Manager's Manual ifplugstatus(8)
NAME
ifplugstatus - A link beat detection tool
SYNOPSIS
ifplugstatus [options] [INTERFACE]
DESCRIPTION
ifplugstatus is an utility which may be used to detect the link status of a local Linux ethernet device, much in the same way mii-diag,
mii-tool and ethtool work. In fact it supports all three different APIs these three tools use. In addition it supports link checking with
the IFF_RUNNING interface flag, which most modern drivers (not only ethernet) support, and association status checking with the wireless
extension API for WLAN devices.
The APIs are tried in the following order:
First the newest API: SIOCETHTOOL (aka ethtool API)
Second the next older API: SIOCGMIIREG (aka mii-diag API)
Than the WLAN API: wireless extension (aka iwconfig API)
Followed by the cleanest API: IFF_RUNNING (aka ifconfig API)
The oldest API (SIOCPRIV aka mii-tool API) is not tested since it is obsolete.
ifplugstatus may be used in shell script since it returns the current status as return value. It is especially useful to detect the avail-
able APIs on the used network driver. (Option -v)
OPTIONS
You may specify an ethernet device on the command line. Otherwise ifplugstatus will check all available network interfaces.
-a | --auto
Enable interface automatically before querying (default: off)
-h | --help
Show help
-q | --quiet
Decrease verbosity by one. If the verbosity is < 0, no text will be shown, only the return value is relevant; if the verbosity is =
0, a terse status will be shown; If the verbosity is > 0, detailed information about the used API is returned. (By default the ver-
bosity is 0)
-v | --verbose
Increase verbosity by one. See option -q.
-V | --version
Show version
RETURN VALUES
0 Success
1 Failure
2 Link beat detected (only available when an interface is specified)
3 Unplugged (same here)
AUTHOR
ifplugd was written by Lennart Poettering <mzvscyhtq (at) 0pointer (dot) de>. ifplugd is available at
http://0pointer.de/lennart/projects/ifplugd/
SEE ALSO
mii-diag(8), mii-tool(8), ethtool(8), ifplugd(8)
COMMENTS
This man page was written using xml2man(1) by Oliver Kurth.
Manuals User ifplugstatus(8)