Development of a Linux Driver for a MOST Interface and Porting to RTAI

Total Page:16

File Type:pdf, Size:1020Kb

Development of a Linux Driver for a MOST Interface and Porting to RTAI FACHHOCHSCHULE LANDSHUT FACHBEREICH INFORMATIK Development of a Linux Driver for a MOST Interface and Porting to RTAI Diplomarbeit Vorgelegt von: Bernhard Walle aus Neufahrn i. NB Eingereicht am: 15. September 2006 Betreuer FH: Prof. Dr. rer. nat. Peter Hartlmüller Betreuer Siemens: Gernot Hillier, Siemens AG, CT SE 2 Erklärung zur Diplomarbeit (gemäß § 31, Abs. 7 RaPO) Name, Vorname des Studierenden: Bernhard Walle Fachhochschule Landshut Fachbereich Informatik Hiermit erkläre ich, dass ich die Arbeit selbständig verfasst, noch nicht an- derweitig für Prüfungszwecke vorgelegt, keine anderen als die angegebenen Quellen oder Hilfsmittel benützt sowie wörtliche und sinngemäße Zitate als solche gekennzeichnet habe. 15. 09. 2006 Datum Unterschrift des Studierenden Contents 1 Introduction 19 1.1 About the Topic of this Thesis .............................. 19 1.2 Overview ......................................... 20 1.3 Conventions ....................................... 20 1.3.1 Terms ....................................... 20 1.3.2 Units ....................................... 21 1.3.3 Typographical Conventions ........................... 21 1.4 Source Code ....................................... 21 1.4.1 Listings ...................................... 21 1.4.2 Original Software Code ............................. 22 1.4.3 MOST Driver and Utilities ........................... 22 2 Basics 23 2.1 Linux Device drivers ................................... 23 2.1.1 Kernel Modules ................................. 23 2.1.2 Device Files and System Calls .......................... 25 2.1.3 Linux Driver API ................................. 25 2.1.4 The Proc FS and Other Virtual File Systems .................. 26 2.1.5 Hardware Communication ........................... 26 2.1.5.1 I/O Ports and I/O Memory ...................... 26 2.1.5.2 Interrupts ............................... 27 2.1.6 PCI ........................................ 28 2.1.6.1 PCI Configuration .......................... 28 2.1.6.2 The PCI Subsystem in Linux ..................... 28 2.1.7 Managing Concurrency ............................. 30 2.1.7.1 Contexts ................................ 30 2.1.7.2 Mechanisms .............................. 31 2.1.8 Timestamps ................................... 32 2.1.8.1 Hardware Timers ........................... 32 2.1.8.2 Linux Timekeeping Architecture .................. 32 2.1.9 Softirqs ...................................... 34 2.2 Real-time Operating Systems .............................. 35 2.2.1 Overview ..................................... 35 2.2.2 Real-time Linux ................................. 36 2.2.2.1 Introduction ............................. 36 2.2.2.2 Virtualisation Layers ......................... 36 2.2.3 Real-time Applications with RTAI ....................... 38 2.2.3.1 Kernelspace .............................. 38 2.2.3.2 Userspace ............................... 40 2.2.3.3 Communication with Linux Applications .............. 40 2.2.4 Xenomai ..................................... 42 5 2.2.5 Real-time Drivers ................................ 43 2.2.5.1 Motivation .............................. 43 2.2.5.2 Accessing Device Drivers from RTAI Tasks ............. 43 2.2.5.3 Already Existing Real-Time Drivers ................. 44 2.3 MOST ........................................... 45 2.3.1 Overall Information ............................... 45 2.3.2 Data Transfer ................................... 46 2.3.2.1 Synchronous Data .......................... 46 2.3.2.2 Control Data ............................. 46 2.3.2.3 Asynchronous Data .......................... 47 2.3.3 System Architecture ............................... 48 2.3.3.1 Terms ................................. 48 2.3.3.2 Hardware ............................... 48 2.3.3.3 Software ................................ 49 2.3.4 MOST PCI Board ................................ 50 2.3.4.1 Overview ............................... 50 2.3.4.2 Data Flow ............................... 50 2.3.5 OptoLyzer .................................... 52 2.3.6 Windows Software Architecture ........................ 53 2.3.6.1 Control Messages ........................... 53 2.3.6.2 Synchronous and Asynchronous Data ................ 54 3 Requirements 55 3.1 Current Situation ..................................... 55 3.1.1 Real-time Drivers ................................ 55 3.1.2 MOST ...................................... 56 3.2 Functional Requirements ................................ 56 3.2.1 Linux Driver ................................... 56 3.2.2 RTDM Driver .................................. 56 3.2.3 Hardware ..................................... 57 3.2.4 Sample Applications ............................... 57 3.3 Non-functional Requirements .............................. 57 3.3.1 Data rates .................................... 57 3.3.2 Relationship to PCI Timing ........................... 58 3.3.3 Calculation of Timing Constraints ....................... 59 3.3.4 Result ....................................... 59 4 Linux Driver 61 4.1 Structure ......................................... 61 4.1.1 Overview ..................................... 61 4.1.2 Base driver .................................... 61 4.1.3 Low and High Drivers .............................. 62 4.1.3.1 Low Driver .............................. 62 4.1.3.2 High Driver .............................. 63 4.1.3.3 Driver Structures ........................... 64 4.1.4 MOST Device .................................. 64 4.1.4.1 Managing the Device Count ..................... 66 4.2 MOST NetServices .................................... 67 4.2.1 Introduction ................................... 67 6 Contents 4.2.2 Userspace vs. Kernelspace ........................... 67 4.2.3 The Kernel Module ............................... 68 4.2.3.1 General Description ......................... 68 4.2.3.2 Interrupt Processing ......................... 69 4.2.4 Userspace NetServices Implementation .................... 71 4.2.4.1 Device Access and Callback Functions ............... 71 4.2.4.2 Initialisation and Deinitialisation .................. 72 4.2.4.3 Service Thread ............................ 72 4.2.5 Sample Program for Control Messages ..................... 73 4.3 MOST Synchronous Driver ............................... 75 4.3.1 Access the Driver from Userspace ....................... 75 4.3.1.1 Configuring the Routing Engine ................... 75 4.3.1.2 Configuring the Driver ........................ 76 4.3.1.3 Reading and Writing Data ...................... 77 4.3.2 MOST Synchronous Kernel Driver ....................... 77 4.3.2.1 Buffering of Data ........................... 78 4.3.2.2 Managing the Data Flow in the Driver ................ 79 4.3.2.3 Data Structures ............................ 79 4.3.2.4 Synchronous Transmission ..................... 80 4.3.3 Sample Program for Synchronous Transfer .................. 81 4.3.4 PCI Bus Transfers ................................ 81 4.3.4.1 Setting up the PCI Tracer ....................... 82 4.3.4.2 Transfers on the Bus ......................... 82 5 Porting to RTAI 85 5.1 Introduction ....................................... 85 5.1.1 Overview ..................................... 85 5.1.2 RTNRT Porting Framework ........................... 85 5.1.3 Error Handling ................................. 86 5.2 Real Time Driver Model (RTDM) ............................ 86 5.2.1 Introduction ................................... 86 5.2.2 User API ..................................... 87 5.2.2.1 Overview ............................... 87 5.2.2.2 Using the RTDM in an Example ................... 87 5.2.2.3 Drawbacks .............................. 88 5.2.3 Device Profiles .................................. 89 5.2.4 Driver Development API ............................ 89 5.2.5 API Versioning .................................. 90 5.3 Structure of a Character Device Driver ......................... 90 5.3.1 Partitioning ................................... 90 5.3.2 Basic Structure of a Simple Driver ....................... 91 5.3.3 Registering a Character Device ......................... 91 5.3.4 The Device Context ............................... 93 5.3.5 Per-device Data ................................. 93 5.4 Porting Common Patterns Found in Drivers ...................... 94 5.4.1 Resource Management and Memory Access .................. 94 5.4.2 Interrupt Handling ............................... 94 5.4.2.1 Registering an Interrupt Handler .................. 94 5.4.2.2 Deregistering an Interrupt Handler ................. 95 Contents 7 5.4.2.3 Sharing Interrupts Between RTAI and Linux ............ 95 5.4.2.4 Return Value of the Interrupt Handler ............... 97 5.4.2.5 Using the RTNRT Framework .................... 97 5.4.3 Synchronisation ................................. 100 5.4.3.1 Contexts ................................ 100 5.4.3.2 Spinlocks ............................... 100 5.4.3.3 Semaphores and Mutexes ...................... 101 5.4.3.4 Wait Queues ............................. 102 5.4.3.5 Sequence Locks ............................ 104 5.4.4 Allocating Memory ............................... 106 5.4.5 Copying From and To Userspace ........................ 106 5.4.5.1 Basics ................................. 106 5.4.5.2 Using the Functions in the RTNRT Framework ........... 106 5.4.6 Kernel Threads ................................. 107 5.4.6.1 Linux Kernel Threads ........................ 108 5.4.6.2 Real-time Task ............................ 108 5.4.7 Time Stamps ..................................
Recommended publications
  • Embedding Redhat Linux in a Diskonchip - HOWTO
    Embedding Redhat Linux in a DiskOnChip - HOWTO Don Davies, Prosig Ltd ( [email protected]) October 2002 Describes the configuration and setup of a development environment for a Single Board Computer running Redhat Linux from a DiskOnChip device. Contents 1.0 Introduction ..........................................................................................................3 1.1 Hardware Details..................................................................................................3 1.2 System Configuration ...........................................................................................4 2.0 DOS Development Environment...........................................................................5 2.1 DiskOnChip Tools ................................................................................................5 2.2 Boot Loader..........................................................................................................6 2.3 MS-DOS System Startup......................................................................................6 3.0 Linux Development Environment ......................................................................7 3.1 Custom Kernel Configuration ............................................................................8 3.2 Building Custom Kernel ..................................................................................10 3.3 Booting Custom Kernel ...................................................................................10 3.4 Formatting DiskOnChip for Linux
    [Show full text]
  • Is Parallel Programming Hard, And, If So, What Can You Do About It?
    Is Parallel Programming Hard, And, If So, What Can You Do About It? Edited by: Paul E. McKenney Linux Technology Center IBM Beaverton [email protected] December 16, 2011 ii Legal Statement This work represents the views of the authors and does not necessarily represent the view of their employers. IBM, zSeries, and Power PC are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. Linux is a registered trademark of Linus Torvalds. i386 is a trademarks of Intel Corporation or its subsidiaries in the United States, other countries, or both. Other company, product, and service names may be trademarks or service marks of such companies. The non-source-code text and images in this doc- ument are provided under the terms of the Creative Commons Attribution-Share Alike 3.0 United States li- cense (http://creativecommons.org/licenses/ by-sa/3.0/us/). In brief, you may use the contents of this document for any purpose, personal, commercial, or otherwise, so long as attribution to the authors is maintained. Likewise, the document may be modified, and derivative works and translations made available, so long as such modifications and derivations are offered to the public on equal terms as the non-source-code text and images in the original document. Source code is covered by various versions of the GPL (http://www.gnu.org/licenses/gpl-2.0.html). Some of this code is GPLv2-only, as it derives from the Linux kernel, while other code is GPLv2-or-later.
    [Show full text]
  • Reference Guide
    Reference Guide Scyld ClusterWare Release 5.10.1-5101g0000 December 18, 2013 Reference Guide: Scyld ClusterWare Release 5.10.1-5101g0000; December 18, 2013 Revised Edition Published December 18, 2013 Copyright © 1999 - 2013 Penguin Computing, Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording or otherwise) without the prior written permission of Penguin Computing, Inc.. The software described in this document is "commercial computer software" provided with restricted rights (except as to included open/free source). Use beyond license provisions is a violation of worldwide intellectual property laws, treaties, and conventions. Scyld ClusterWare, the Highly Scyld logo, and the Penguin Computing logo are trademarks of Penguin Computing, Inc.. Intel is a registered trademark of Intel Corporation or its subsidiaries in the United States and other countries. Infiniband is a trademark of the InfiniBand Trade Association. Linux is a registered trademark of Linus Torvalds. Red Hat and all Red Hat-based trademarks are trademarks or registered trademarks of Red Hat, Inc. in the United States and other countries. All other trademarks and copyrights referred to are the property of their respective owners. Table of Contents Preface .....................................................................................................................................................................................v
    [Show full text]
  • OS Awareness Manual Linux
    OS Awareness Manual Linux TRACE32 Online Help TRACE32 Directory TRACE32 Index TRACE32 Documents ...................................................................................................................... OS Awareness Manuals ................................................................................................................ OS Awareness and Run Mode Debugging for Linux .............................................................. OS Awareness Manual Linux ................................................................................................. 1 Overview ............................................................................................................................... 4 Terminology 4 Brief Overview of Documents for New Users 5 Supported Versions 5 Configuration ........................................................................................................................ 6 Quick Configuration Guide 6 Hooks & Internals in Linux 6 Features ................................................................................................................................ 8 Display of Kernel Resources 8 Task-Related Breakpoints 8 Task Context Display 9 MMU Support 11 Space IDs 11 MMU Declaration 11 Debugger Table Walk 17 Symbol Autoloader 18 SMP Support 19 Dynamic Task Performance Measurement 20 Task Runtime Statistics 20 Process / thread switch support for ARM using context ID register: 21 Task State Analysis 21 Function Runtime Statistics 22 Linux Specific Menu 24 Debugging Linux Kernel
    [Show full text]
  • Absolute BSD—The Ultimate Guide to Freebsd Table of Contents Absolute BSD—The Ultimate Guide to Freebsd
    Absolute BSD—The Ultimate Guide to FreeBSD Table of Contents Absolute BSD—The Ultimate Guide to FreeBSD............................................................................1 Dedication..........................................................................................................................................3 Foreword............................................................................................................................................4 Introduction........................................................................................................................................5 What Is FreeBSD?...................................................................................................................5 How Did FreeBSD Get Here?..................................................................................................5 The BSD License: BSD Goes Public.......................................................................................6 The Birth of Modern FreeBSD.................................................................................................6 FreeBSD Development............................................................................................................7 Committers.........................................................................................................................7 Contributors........................................................................................................................8 Users..................................................................................................................................8
    [Show full text]
  • Discovering and Emulating an Intel Gigabit Ethernet Device
    Discovering and emulating an Intel Gigabit Ethernet device. Student: Bao Chi Tran Nguyen , Supervisor: Knut Omang Master’s Thesis Spring 2017 Preface Thanks to Aril Schultzen, Marie Ekeberg, Thomas Plagemann, Morten Rosseland, Linda Sørensen, Esra Boncuk, Torstein Winterseth and David Huynh for their help. 3 4 Contents 1 Introduction 3 1.1 Motivation . .4 1.2 Problem . .5 1.3 Methodology . .6 1.4 Outline . .6 2 Background 7 2.1 Virtualization . .7 2.2 QEMU . 10 2.3 PC . 12 2.4 Operating system . 12 2.5 PCI . 17 2.6 PCI-Express . 20 2.7 SR/IOV . 23 2.8 E1000 . 24 2.9 Igb . 28 3 Framework 33 4 Goals 37 5 Methodology and tools 39 6 Environment 41 7 Discovery 45 8 Results 47 8.1 MMIO . 49 8.2 Device structure . 54 8.3 New advanced descriptors . 55 8.4 Initialize and cleanup. 57 8.5 EEPROM . 57 8.6 PHY (MDIC) . 58 8.7 Statistics . 59 8.8 Descriptor queues . 59 5 8.9 Legacy interrupt . 59 8.10 VMState . 60 9 Conclusion 61 9.1 Summary . 61 9.2 Open problems . 61 9.2.1 MMIO . 62 9.2.2 Descriptor queues . 62 9.2.3 SR/IOV . 63 6 List of Figures 2.1 The Von Neumann architecture that most computer system derive its architectural design from.[33] . .8 2.2 Layers of communication . .9 2.3 The official QEMU-logo[6] . 10 2.4 QEMU as seen from the host operating system.[27] . 11 2.5 A 80’s IBM PC[11] and todays HP Compaq PC[10].
    [Show full text]
  • Operating System Structures
    COP 4610: Introduction to Operating Systems (Fall 2016) Operating System Structures Zhi Wang Florida State University Content • Operating system services • User interface • System calls • Operating system structures • Virtual machines Operating System Services • Operating systems provides an environment for program execution and services to programs and users • a set of services is helpful to (visible to) users: • user interface • program execution • I/O operation • file-system manipulation • communication • error detection • another set of services exists for ensuring efficient operation of the system: • resource allocation • accounting • protection and security A View of Operating System Services Operating System Services (User-Visible) • User interface • most operating systems have a user interface (UI). • e.g., command-Line (CLI), graphics user interface (GUI), or batch • Program execution • load and execute an program in the memory • end execution, either normally or abnormally • I/O operations • a running program may require I/O such as file or I/O device • File-system manipulation • read, write, create and delete files and directories • search or list files and directories • permission management Operating System Services (User-Visible) • Communications • processes exchange information, on the same system or over a network • via shared memory or through message passing • Error detection • OS needs to be constantly aware of possible errors • errors in CPU, memory, I/O devices, programs • it should take appropriate actions to ensure correctness
    [Show full text]
  • System Log Files Kernel Ring Buffer Viewing Log Files the Log Files
    System Log Files Most log files are found in /var/log Checking logs are critical to see if things are working correctly Checking logs is critical to see if things are working correctly. Take a look at all the log files on scratch ls /var/log Kernel Ring Buffer The kernel ring buffer is something like a log file for the kernel; however, unlike other log files, it’s stored in memory rather than in a disk file. You can use the dmesg command to view it. Many times it is logged to /var/log/dmesg as well. It requires sudo privileges to read the /var/log/dmesg file, but not to run the dmesg command. Viewing log files There are a number of commands to view log files. cat less head tail Anytime a new entry is added to a log file, it is appended to the end of the file. This is one of those times where tail is particularly useful. Usually when we want to look at log files we want to look at the most recent entries. When organizing our viewing command - order matters. Most of the following commands produce different results. And all are useful depending on what type of results you want. Go through the thought process and figure out what each command does. Can you figure out which three produce identical results? cat /var/log/syslog cat /var/log/syslog | grep daemon cat /var/log/syslog | grep daemon | tail -n 10 cat /var/log/syslog | tail -n 10 cat /var/log/syslog | tail -n 10 | grep daemon less /var/log/syslog less /var/log/syslog | tail -n 10 | grep daemon head -n 10 /var/log/syslog head -n 10 /var/log/syslog | grep daemon tail -n 10 /var/log/syslog tail -n 10 /var/log/syslog | grep daemon If you add the -f option to the tail command it provides a live watch of the log file.
    [Show full text]
  • Introduction to the Linux Kernel: Challenges and Case Studies
    Introduction to the Linux kernel: challenges and case studies Juan Carlos Sáez Alcaide Department of Computer Architecture and Automation ArTeCS Group Complutense University of Madrid IV Semana de la Informática 2018 Feb 8, 2018 About Me Juan Carlos Sáez Alcaide ([email protected]) Interim Associate Professor, UCM Department of Computer Architecture and Automation Teaching: Operating Systems, Linux and Android Internals,… Member of the ArTeCS Research Group High Performance Computing Computer Architecture Interaction between system software and architecture … UCM Campus Representative of the USENIX Int’l Association Login (USENIX Magazine) IV Semana de la Informática 2018 - 2 Outline 1 Introduction 2 Main Features 3 Kernel Control Paths and Concurrency 4 Common Kernel abstractions 5 A case study: PMCTrack tool IV Semana de la Informática 2018 - 3 Outline 1 Introduction 2 Main Features 3 Kernel Control Paths and Concurrency 4 Common Kernel abstractions 5 A case study: PMCTrack tool IV Semana de la Informática 2018 - 4 Unix (I) Unics – Unix (1969) Created by Ken Thompson and rewrit- ten in “C” by Dennis Ritchie (1973) V6 (1975): Public source code (AT&T license) BSD distributions (Billy Joy) John Lion’s book on UNIX V6 Keys to success 1 Inexpensive license 2 Source code available 3 Code was simple and easy to modify 4 Ran on modest HW IV Semana de la Informática 2018 - 5 Unix (II) Unix (Cont.) V7 (1979): code can be no longer used for academic purposes Xenix (1980) Microsoft SCO Unix System III (1982) Unix System V (1983) HP-UX, IBM’s AIX, Sun’s Solaris IV Semana de la Informática 2018 - 6 Unix (III) Proyecto GNU (1983) - Richard Stallman SO GNU: Emacs, GNU compiler collection (GCC), GNU Hurd (kernel) Minix v1 (1987) - Andrew Tanenbaum Richard Stallman Minimal Unix-like OS (Unix clone) Teaching purposes.
    [Show full text]
  • 11. Kernel Design 11
    11. Kernel Design 11. Kernel Design Interrupts and Exceptions Low-Level Synchronization Low-Level Input/Output Devices and Driver Model File Systems and Persistent Storage Memory Management Process Management and Scheduling Operating System Trends Alternative Operating System Designs 269 / 352 11. Kernel Design Bottom-Up Exploration of Kernel Internals Hardware Support and Interface Asynchronous events, switching to kernel mode I/O, synchronization, low-level driver model Operating System Abstractions File systems, memory management Processes and threads Specific Features and Design Choices Linux 2.6 kernel Other UNIXes (Solaris, MacOS), Windows XP and real-time systems 270 / 352 11. Kernel Design – Interrupts and Exceptions 11. Kernel Design Interrupts and Exceptions Low-Level Synchronization Low-Level Input/Output Devices and Driver Model File Systems and Persistent Storage Memory Management Process Management and Scheduling Operating System Trends Alternative Operating System Designs 271 / 352 11. Kernel Design – Interrupts and Exceptions Hardware Support: Interrupts Typical case: electrical signal asserted by external device I Filtered or issued by the chipset I Lowest level hardware synchronization mechanism Multiple priority levels: Interrupt ReQuests (IRQ) I Non-Maskable Interrupts (NMI) Processor switches to kernel mode and calls specific interrupt service routine (or interrupt handler) Multiple drivers may share a single IRQ line IRQ handler must identify the source of the interrupt to call the proper → service routine 272 / 352 11. Kernel Design – Interrupts and Exceptions Hardware Support: Exceptions Typical case: unexpected program behavior I Filtered or issued by the chipset I Lowest level of OS/application interaction Processor switches to kernel mode and calls specific exception service routine (or exception handler) Mechanism to implement system calls 273 / 352 11.
    [Show full text]
  • Understanding the Linux Kernel, 3Rd Edition by Daniel P
    1 Understanding the Linux Kernel, 3rd Edition By Daniel P. Bovet, Marco Cesati ............................................... Publisher: O'Reilly Pub Date: November 2005 ISBN: 0-596-00565-2 Pages: 942 Table of Contents | Index In order to thoroughly understand what makes Linux tick and why it works so well on a wide variety of systems, you need to delve deep into the heart of the kernel. The kernel handles all interactions between the CPU and the external world, and determines which programs will share processor time, in what order. It manages limited memory so well that hundreds of processes can share the system efficiently, and expertly organizes data transfers so that the CPU isn't kept waiting any longer than necessary for the relatively slow disks. The third edition of Understanding the Linux Kernel takes you on a guided tour of the most significant data structures, algorithms, and programming tricks used in the kernel. Probing beyond superficial features, the authors offer valuable insights to people who want to know how things really work inside their machine. Important Intel-specific features are discussed. Relevant segments of code are dissected line by line. But the book covers more than just the functioning of the code; it explains the theoretical underpinnings of why Linux does things the way it does. This edition of the book covers Version 2.6, which has seen significant changes to nearly every kernel subsystem, particularly in the areas of memory management and block devices. The book focuses on the following topics: • Memory management, including file buffering, process swapping, and Direct memory Access (DMA) • The Virtual Filesystem layer and the Second and Third Extended Filesystems • Process creation and scheduling • Signals, interrupts, and the essential interfaces to device drivers • Timing • Synchronization within the kernel • Interprocess Communication (IPC) • Program execution Understanding the Linux Kernel will acquaint you with all the inner workings of Linux, but it's more than just an academic exercise.
    [Show full text]
  • Unix Commands (09/04/2014)
    Unix Commands (09/04/2014) • Access control – login <login_name> – exit – passwd <login_name> – yppassswd <loginname> – su – • Login as Super user – su <login> • Login as user <login> • Root Prompt – [root@localhost ~] # • User Prompt – [bms@raxama ~] $ On Line Documentation – man <command/topic> – info <command/topic> • Working with directories – mkdir –p <subdir> ... {-p create all directories in path if not present} mkdir –p /2015/Jan/21/14 will create /2015, Jan, 21 & 14 in case any of these is absent – cd <dir> – rm -r <subdir> ... Man Pages • 1 Executable programs or shell commands • 2 System calls (functions provided by the kernel) • 3 Library calls (functions within program libraries) • 4 Special files (usually found in /dev) • 5 File formats and conventions eg /etc/passwd • 6 Games • 7 Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7) • 8 System administration commands (usually only for root) • 9 Kernel routines [Non standard] – man grep, {awk,sed,find,cut,sort} – man –k mysql, man –k dhcp – man crontab ,man 5 crontab – man printf, man 3 printf – man read, man 2 read – man info Runlevels used by Fedora/RHS Refer /etc/inittab • 0 - halt (Do NOT set initdefault to this) • 1 - Single user mode • 2 - Multiuser, – without NFS (The same as 3, if you do not have networking) • 3 - Full multi user mode w/o X • 4 - unused • 5 - X11 • 6 - reboot (Do NOT set init default to this) – init 6 {Reboot System} – init 0 {Halt the System} – reboot {Requires Super User} – <ctrl> <alt> <del> • in tty[2-7] mode – tty switching • <ctrl> <alt> <F1-7> • In Fedora 10 tty1 is X.
    [Show full text]