Sponsored Content
The Lounge War Stories Prize of being an Admin - Part 2 Post 302840649 by rbatte1 on Tuesday 6th of August 2013 06:54:40 AM
Old 08-06-2013
Okay, so I'm really sad then. Enough said.

Smilie
 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

comparing part of header with part of detailed records.

Hi there, I am lil confused with the following issue. I have a File, which has the following header: IMSHRATE_043008_101016 a sample detailed record is :9820101 A982005000CAVG030108000000000000010169000MAR 2008 9820102 MAR 2008 D030108 ... (1 Reply)
Discussion started by: cmaroju
1 Replies

2. What is on Your Mind?

Windows Admin switching to *nix Admin

I'm currently a Windows admin and have wanted to jump ship to the *nix side for a while now. I've been studying both through an lpic level 1 manual as I have time (focusing on debian), and a solaris 10 cert book. The problem is I only have a handful of hours a week to study, and my current job... (3 Replies)
Discussion started by: bobwilson
3 Replies

3. War Stories

Prize of being an Admin

Was wondering if anyone has come across any situation where you do your best to help users and in return you get a nice escalation from top level management! Here's my story: One fine morning, I was sitting idle, doing next to nothing, I got an alert from helpdesk people about a problem with... (30 Replies)
Discussion started by: admin_xor
30 Replies

4. Shell Programming and Scripting

[Solved] Printing a part of the last line of the specific part of a file

Hi, I have 80 large files, from which I want to get a specific value to run a Bash script. Firstly, I want to get the part of a file which contains this: Name =A xxxxxx yyyyyy zzzzzz aaaaaa bbbbbb Value = 57 This is necessary because in a file there are written more lines which... (6 Replies)
Discussion started by: wenclu
6 Replies

5. What is on Your Mind?

Regarding Admin life either as DBA or UNIX Linux admin

I am planning to choose my career as Unix/Linux Admin or a DBA. But I have come to know from forums and few admins like the job will be 24/7. I have few questions on that. Can we get "DAY" shifts in any one of the admin Job ? Can't we have shift timings in any company ? Eventhough the... (7 Replies)
Discussion started by: Jacktts
7 Replies

6. UNIX for Beginners Questions & Answers

How to make a loop to read the input from a file part by part?

Hi All, We've a VDI infrastructure in AWS (AWS workspaces) and we're planning to automate the process of provisioning workspaces. Instead of going to GUI console, and launching workspaces by selecting individual users is little time consuming. Thus, I want to create them in bunches from AWS CLI... (6 Replies)
Discussion started by: arun_adm
6 Replies
sad(7D) 							      Devices								   sad(7D)

NAME
sad - STREAMS Administrative Driver SYNOPSIS
#include <sys/types.h> #include <sys/conf.h> #include <sys/sad.h> #include <sys/stropts.h> int ioctl(int fildes, int command, int arg); DESCRIPTION
The STREAMS Administrative Driver provides an interface for applications to perform administrative operations on STREAMS modules and drivers. The interface is provided through ioctl(2) commands. Privileged operations may access the sad driver using /dev/sad/admin. Unprivileged operations may access the sad driver using /dev/sad/user. The fildes argument is an open file descriptor that refers to the sad driver. The command argument determines the control function to be performed as described below. The arg argument represents additional information that is needed by this command. The type of arg depends upon the command, but it is generally an integer or a pointer to a command-specific data structure. COMMAND FUNCTIONS
The autopush facility (see autopush(1M)) allows one to configure a list of modules to be automatically pushed on a stream when a driver is first opened. Autopush is controlled by the following commands:"7">SAD_SAPAllows the administrator to configure the given device's autopush information. arg points to a strapush structure, which contains the following members: unit_t ap_cmd; major_t sap_major; minor_t sap_minor; minor_t sap_lastminor; unit_t sap_npush; unit_t sap_list [MAXAPUSH] [FMNAMESZ + 1]; The sap_cmd field indicates the type of configuration being done. It may take on one of the following values: "small and bold"Configure one minor device of a driver. SAP_RANGE Configure a range of minor devices of a driver. SAP_ALL Configure all minor devices of a driver. SAP_CLEAR Undo configuration information for a driver. The sap_major field is the major device number of the device to be configured. The sap_minor field is the minor device number of the device to be configured. The sap_lastminor field is used only with the SAP_RANGE command, which configures a range of minor devices between sap_minor and sap_lastminor, inclusive. The minor fields have no meaning for the SAP_ALL command. The sap_npush field indicates the number of modules to be automatically pushed when the device is opened. It must be less than or equal to MAXAPUSH , defined in sad.h. It must also be less than or equal to NSTRPUSH, the maximum number of modules that can be pushed on a stream, defined in the kernel mas- ter file. The field sap_list is an array of NULL-terminated module names to be pushed in the order in which they appear in the list. When using the SAP_CLEAR command, the user sets only sap_major and sap_minor. This will undo the configuration information for any of the other commands. If a previous entry was configured as SAP_ALL, sap_minor should be set to zero. If a previous entry was configured as SAP_RANGE , sap_minor should be set to the lowest minor device number in the range configured. On failure, errno is set to the following value: EFAULT arg points outside the allocated address space. EINVAL The major device number is invalid, the number of modules is invalid, or the list of module names is invalid. ENOSTR The major device number does not represent a STREAMS driver. EEXIST The major-minor device pair is already configured. ERANGE The command is SAP_RANGE and sap_lastminor is not greater than sap_minor, or the command is SAP_CLEAR and sap_minor is not equal to the first minor in the range. ENODEV The command is SAP_CLEAR and the device is not configured for autopush. ENOSR An internal autopush data structure cannot be allocated. SAD_GAP Allows any user to query the sad driver to get the autopush configuration information for a given device. arg points to a strapush structure as described in the previous command. The user should set the sap_major and sap_minor fields of the strapush structure to the major and minor device numbers, respectively, of the device in question. On return, the strapush structure will be filled in with the entire information used to configure the device. Unused entries in the module list will be zero-filled. On failure, errno is set to one of the following values: EFAULT arg points outside the allocated address space. EINVAL The major device number is invalid. ENOSTR The major device number does not represent a STREAMS driver. ENODEV The device is not configured for autopush. SAD_VML Allows any user to validate a list of modules (that is, to see if they are installed on the system). arg is a pointer to a str_list structure with the following members: int sl_nmods; struct str_mlist *sl_modlist; The str_mlist structure has the following member: char l_name[FMNAMESZ+1]; sl_nmods indicates the number of entries the user has allocated in the array and sl_modlist points to the array of module names. The return value is 0 if the list is valid, 1 if the list contains an invalid module name, or -1 on failure. On failure, errno is set to one of the following values: EFAULT arg points outside the allocated address space. EINVAL The sl_nmods field of the str_list structure is less than or equal to zero. SEE ALSO
intro(2), ioctl(2), open(2) STREAMS Programming Guide DIAGNOSTICS
Unless otherwise specified, the return value from ioctl() is 0 upon success and -1 upon failure with errno set as indicated. SunOS 5.10 16 Apr 1997 sad(7D)
All times are GMT -4. The time now is 10:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy