03-15-2007
writing your own command in unix/linux
Hi
I am very new to Linux programming,otherwise I have exposure to Linux. Was thinking about something like writing my own commands for Linux. Any ideas where to start, any useful links and what I need to know before I start with this.
Thanks
Sidhu
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi All:
I want to write a program that runs like a service(in the background) and should start up when the system boots. It should always be running, no matter who has logged in, no matter if anybody has logged in et all.
Is there any online help i could get on this topic, appreciate the help... (4 Replies)
Discussion started by: preetham
4 Replies
2. What is on Your Mind?
Yep, that's right.
I'm writing a Linux binary that requires an X11 Server. It will also be released in a Shell, Win32, and Cocoa (Mac OS X).
It's a program that's a text editor and more. It not just creates TXT and RTF files, it also can save in XML, RSS, and a whole lot of other formats.
... (11 Replies)
Discussion started by: Danny_10
11 Replies
3. UNIX for Dummies Questions & Answers
How to convert this linux command to Unix AIX?
I have tried this command and work in CentOS:
tail --line=0 --retry -f --follow=name --max-unchanged-stats=1 logFile.log
But in AIX, the tail haven't "--retry" "--follow=name" option.
Thanks in advance. (1 Reply)
Discussion started by: chris13work
1 Replies
4. UNIX for Dummies Questions & Answers
Hello all
the su with -l option is running normal with linux but when i try to run it on unix AIX 5.2.7 it's not working with -l option
any help (6 Replies)
Discussion started by: islam.said
6 Replies
5. Shell Programming and Scripting
Hi,
Your great help is very appreciated. I am looking for any Unix command or tool for doing Stress/Load test of php files at command prompt.
I tried torture.pl but it is not working after20 concurrent threads/users.
as it is very urgent for me..please suggest ur ideas asap.
thanks (5 Replies)
Discussion started by: Malleswari
5 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
I was trying to install from source USB_ModeSwitch on my Mac. I have always had success with the basic ./configure, make, make install commands in terminal so don't know how, why or what.
The issue I came across is that the makefile.conf uses the -D flag while installing and on UNIX... (0 Replies)
Discussion started by: jprokos
0 Replies
7. HP-UX
I have an HP Unix server with Oracle DB and want to write Datapumo export files across the network to IMB/Linux NFS. Will that work? (3 Replies)
Discussion started by: Duane McDonough
3 Replies
8. Linux
Hi,
When i ran the command as sar in linux box. i got a output like as below
$ sar
Linux 2.6.18-274.3.1.el5 (scrbgcddkcph431) 06/29/2012
12:00:01 AM CPU %user %nice %system %iowait %steal %idle
12:10:01 AM all 8.78 0.00 26.11 ... (8 Replies)
Discussion started by: Mani_apr08
8 Replies
9. HP-UX
Hi,
I have the below command for Linux
find -iname '*.ear' -o -iname '*.war' | xargs grep -R org.apache.log4jWhat is the HP-UX equivalent of this ? (4 Replies)
Discussion started by: mohtashims
4 Replies
10. Shell Programming and Scripting
Hello Everyone,
I am executing a unix script which logs into 50+ servers (netapp servers) and runs some commands and captures output locally. Below is the code snippet. file1.txt has names of all the remote servers where I am logging in.
#!/bin/ksh
#!/usr/bin/expect
touch... (1 Reply)
Discussion started by: rahul2662
1 Replies
LEARN ABOUT SUSE
ocf_heartbeat_nfsserver
OCF_HEARTBEAT_NFSSER(7) OCF resource agents OCF_HEARTBEAT_NFSSER(7)
NAME
ocf_heartbeat_nfsserver - Manages an NFS server
SYNOPSIS
nfsserver [start | stop | monitor | meta-data | validate-all]
DESCRIPTION
Nfsserver helps to manage the Linux nfs server as a failover-able resource in Linux-HA. It depends on Linux specific NFS implementation
details, so is considered not portable to other platforms yet.
SUPPORTED PARAMETERS
nfs_init_script
The default init script shipped with the Linux distro. The nfsserver resource agent offloads the start/stop/monitor work to the init
script because the procedure to start/stop/monitor nfsserver varies on different Linux distro. (optional, string, default
/etc/init.d/nfsserver)
nfs_notify_cmd
The tool to send out NSM reboot notification. Failover of nfsserver can be considered as rebooting to different machines. The nfsserver
resource agent use this command to notify all clients about the happening of failover. (optional, string, default /usr/sbin/sm-notify)
nfs_shared_infodir
The nfsserver resource agent will save nfs related information in this specific directory. And this directory must be able to fail-over
before nfsserver itself. (required, string, no default)
nfs_ip
The floating IP address used to access the nfs service (required, string, no default)
SUPPORTED ACTIONS
This resource agent supports the following actions (operations):
start
Starts the resource. Suggested minimum timeout: 40.
stop
Stops the resource. Suggested minimum timeout: 20s.
monitor
Performs a detailed status check. Suggested minimum timeout: 20s. Suggested interval: 10.
meta-data
Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5.
validate-all
Performs a validation of the resource configuration. Suggested minimum timeout: 30.
EXAMPLE
The following is an example configuration for a nfsserver resource using the crm(8) shell:
primitive example_nfsserver ocf:heartbeat:nfsserver
params
nfs_shared_infodir=string
nfs_ip=string
op monitor depth="0" timeout="20s" interval="10"
SEE ALSO
http://www.linux-ha.org/wiki/nfsserver_(resource_agent)
AUTHOR
Linux-HA contributors (see the resource agent source for information about individual authors)
resource-agents 1.0.3 07/05/2010 OCF_HEARTBEAT_NFSSER(7)