Sponsored Content
Full Discussion: Switch
Top Forums Programming Switch Post 84485 by vino on Monday 26th of September 2005 01:39:48 AM
Old 09-26-2005
You can go ahead with the if-else-if combo.

vino
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

can you switch

hi, i am try to run following script in c-shell, using switch command. #!/bin/csh choice=0 while do echo "system monitor" echo " 1) system paging 2) system file inf. 3) system disk inf. 9) exit " echo "select an option: \c" read choice case $choice in 1)... (3 Replies)
Discussion started by: neer45
3 Replies

2. Shell Programming and Scripting

script with more then one switch

Hi, have managed to code a script that has a simple menu so for instance if I run: this will call a help function that displays the programs help, I have coded this in using a case statement so if: case is h) call the help function The problem is I don't know how to code in the... (3 Replies)
Discussion started by: Del33t
3 Replies

3. UNIX for Advanced & Expert Users

switch login

Hi, How can I switch from one login to another login in UNIX. su command is disabled in my environment. Is there any alternate way to login. (1 Reply)
Discussion started by: sharif
1 Replies

4. Shell Programming and Scripting

Switch + stirng

Hi, This script receive in input 2 parameters, the use $2 in this way: switch ($2) case r: p=r-- echo $2 ok breaksw case rw: p=rw- echo $2 ok breaksw case rwx: p=rwx echo $2 ok breaksw default... (5 Replies)
Discussion started by: DNAx86
5 Replies

5. UNIX for Advanced & Expert Users

Accessing switch

Hello Community! Anyone knows how can I access the switch for monitoring the traffic on my LAN? The switch is a Linksys sr2024 Thanks in advance (1 Reply)
Discussion started by: ncatdesigner
1 Replies

6. Shell Programming and Scripting

need help for cp with -p switch

Guys, I need to copy files from source to destination with datetime preserved I did it with cp -p <source>/file <destinaltion>/file But when I do stat command on copied file , it seems the copied file has "change time" modified. Please guide me in understanding (2 Replies)
Discussion started by: mohan_xunil
2 Replies

7. Shell Programming and Scripting

how to access console of a switch having rj45 on switch side to db 9 female on pc side console cable

hi, how to access console of a switch having rj45 on switch side to db 9 female on pc side console cable which needs to be connected to one console server having rj11 on its side and db 9 female on other end.i.e. on switch side,console cable has rj45 and db 9 pin female connector on other side of... (1 Reply)
Discussion started by: pankajd
1 Replies

8. UNIX for Dummies Questions & Answers

Tar with -T switch

Howdy, I'm trying to tar a bunch of files into their own individual tar archives. In other words i have files a.txt thru z.txt and i want to create a.tar thru z.tar in the same folder. I've been using -T to read in the list of files to be archived but i can't get it to work. I think my problem is... (5 Replies)
Discussion started by: fistikuffs
5 Replies

9. Solaris

Switch to su

Hi, I've put the correct root password but why do I get this below? huamin@SOL11I:~$ su Password: su: Sorry huamin@SOL11I:~$ Many Thanks & Best Regards, HuaMin (16 Replies)
Discussion started by: HuaMin
16 Replies
SD_READAHEAD(3)                                                    sd_readahead                                                    SD_READAHEAD(3)

NAME
sd_readahead - Control ongoing disk boot-time read-ahead operations SYNOPSIS
#include "sd-readahead.h" int sd_readahead(const char *action); DESCRIPTION
sd_readahead() may be called by programs involved with early boot-up to control ongoing boot-time disk read-ahead operations. It may be used to terminate read-ahead operations in case an uncommon disk access pattern is to be expected and hence read-ahead replay or collection is unlikely to have the desired speed-up effect on the current or future boot-ups. The action should be one of the following strings: cancel Terminates read-ahead data collection, and drops all read-ahead data collected during this boot-up. done Terminates read-ahead data collection, but keeps all read-ahead data collected during this boot-up around for use during subsequent boot-ups. noreplay Terminates read-ahead replay. RETURN VALUE
On failure, these calls return a negative errno-style error code. It is generally recommended to ignore the return value of this call. NOTES
This function is provided by the reference implementation of APIs for controlling boot-time read-ahead and distributed with the systemd package. The algorithm it implements is simple, and can easily be reimplemented in daemons if it is important to support this interface without using the reference implementation. Internally, this function creates a file in /run/systemd/readahead/ which is then used as flag file to notify the read-ahead subsystem. For details about the algorithm check the liberally licensed reference implementation sources: http://cgit.freedesktop.org/systemd/systemd/plain/src/readahead/sd-readahead.c resp. http://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-readahead.h sd_readahead() is implemented in the reference implementation's drop-in sd-readahead.c and sd-readahead.h files. It is recommended that applications consuming this API copy the implementation into their source tree. For more details about the reference implementation see sd- readahead(7) If -DDISABLE_SYSTEMD is set during compilation this function will always return 0 and otherwise become a NOP. EXAMPLES
Example 1. Cancelling all read-ahead operations During boots where SELinux has to relabel the file system hierarchy, it will create a large amount of disk accesses that are not necessary during normal boots. Hence it is a good idea to disable both read-ahead replay and read-ahead collection. sd_readahead("cancel"); sd_readahead("noreplay"); SEE ALSO
systemd(1), sd-readahead(7), daemon(7) AUTHOR
Lennart Poettering <lennart@poettering.net> Developer systemd 10/07/2013 SD_READAHEAD(3)
All times are GMT -4. The time now is 03:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy