Lab 1: Network Troubleshooting Tools Name

Total Page:16

File Type:pdf, Size:1020Kb

Lab 1: Network Troubleshooting Tools Name Lab 1: Network Troubleshooting Tools Name: Subject: Network Troubleshooting Tools Approved Lecturer: Jirawat Thaenthong Organization: Faculty of Technology and Environment, PSU, Phuket Campus. Date: 19/5/60 Version: 1.0 Objective: 1. Trainees study and practice network troubleshooting tools. 2. Trainees study case studies and discuss with the others. Instructions& Prerequisites: - Trainees should have basic skill of Linux commands. - Linux virtual machine (VirtualBox/VMware) Task 1: Practice basic network troubleshooting tools 1. Link detection/verification with ‘ethtool’ With this command, we can do much more as follows: • Auto-negotiation • The speed of the device • Display all NIC settings • Display auto-negotiation, RX, and TX settings • Display network statistics for a specific NIC • Troubleshoot ethernet connections • Blink the LED of a specific NIC 1.1. Install ‘ethtool’ package. If you have already, skip this step. ------------------------------------------------------------------------------------------------------------------- $ ethtool –h ß Please verify if you have it or not. $ sudo apt install ethtool ßInstall ethtool ------------------------------------------------------------------------------------------------------------------- Ubuntu Networking Part I Page 1 Lab 1: Network Troubleshooting Tools Name: 1.2. Verify how many network interfaces you have. ------------------------------------------------------------------------------------------------------------------- $ ifconfig –a ßList all network interfaces ------------------------------------------------------------------------------------------------------------------- 1.3. Detect which network interface connected to LAN ------------------------------------------------------------------------------------------------------------------- $ ethtool enp0s3 ßAssume this interface is connected to LAN. ------------------------------------------------------------------------------------------------------------------- <Sample output> You will see ‘Link detected: yes’ Ubuntu Networking Part I Page 2 Lab 1: Network Troubleshooting Tools Name: 1.4. Show the NIC statistics ------------------------------------------------------------------------------------------------------------------- $ ethtool –S enp0s3 ------------------------------------------------------------------------------------------------------------------- <Sample output> If you find ethtool reporting-specific errors on a card, there's a problem. 1.5. Locating a specific NIC ------------------------------------------------------------------------------------------------------------------- $ sudo ethtool –p enp0s3 15 ßLED blinking on the specific NIC. ------------------------------------------------------------------------------------------------------------------- It is useful if you have a server with multiple NICs, but you do know which one is correct. Ubuntu Networking Part I Page 3 Lab 1: Network Troubleshooting Tools Name: 1.6. Testing your NIC ------------------------------------------------------------------------------------------------------------------- $ sudo ethtool –t enp0s3 online ------------------------------------------------------------------------------------------------------------------- <Sample output> Online - tests nvram and a link test Offline - tests register, memory, loopback, interrupt ß Some NIC does not support function Practice by yourself Ubuntu Networking Part I Page 4 Lab 1: Network Troubleshooting Tools Name: 2. IP addressing 2.1. When you assign network configuration with ifconfig and route command, If you no longer use temporary network configuration, you can remove or purge with command ------------------------------------------------------------------------------------------------------------------- $ sudo ip addr flush enp0s3 ------------------------------------------------------------------------------------------------------------------- 2.2. Release IP address assigned by DHCP server ------------------------------------------------------------------------------------------------------------------- $ sudo dhclient –r ------------------------------------------------------------------------------------------------------------------- 2.3. Renew IP address from DHCP server ------------------------------------------------------------------------------------------------------------------- $ sudo dhclient enp0s3 ß Assume your computer get IP address on this interface. ------------------------------------------------------------------------------------------------------------------- 2.4. Sdf 3. Wi-Fi Troubleshooting 3.1. Wireless connection troubleshooter 3.1.1. lshw command (H/W list) ------------------------------------------------------------------------------------------------------------------- $ lshw ------------------------------------------------------------------------------------------------------------------- 3.1.2. lspci command (Wireless PCI) ------------------------------------------------------------------------------------------------------------------- $ lspci ------------------------------------------------------------------------------------------------------------------- Ubuntu Networking Part I Page 5 Lab 1: Network Troubleshooting Tools Name: 3.1.3. lsusb command (Wireless USB adapter) ------------------------------------------------------------------------------------------------------------------- $ lsusb ------------------------------------------------------------------------------------------------------------------- 3.2. Increase Wi-Fi Signal Strength. Try this if you have Ubuntu host (not virtual machine). 3.2.1. Install Wireless Tool ------------------------------------------------------------------------------------------------------------------- $ sudo apt install wireless-tools ------------------------------------------------------------------------------------------------------------------- 3.2.2. Verify your wireless NIC info. ------------------------------------------------------------------------------------------------------------------- $ ifconfig ------------------------------------------------------------------------------------------------------------------- 3.2.3. Increase Wi-Fi signal strength. ------------------------------------------------------------------------------------------------------------------- $ iw reg set BO $ iwconfig wlan0 txpower 30 ß Assume you have wireless NIC ‘wlan0’ ------------------------------------------------------------------------------------------------------------------- <if it doesn’t work> Let try ------------------------------------------------------------------------------------------------------------------- $ ifconfig wlan0 down $ iw reg set BO $ ifconfig wlan0 up $ iwconfig wlan0 channel xx ß if needed $ iwconfig wlan0 txpower 30 ------------------------------------------------------------------------------------------------------------------- Ubuntu Networking Part I Page 6 Lab 1: Network Troubleshooting Tools Name: 4. Network monitoring and troubleshooting Normally, we use ‘top’ program to overview all the processes or threads running in the system. However, it just the program from the old-style. We have some list of monitoring tools that works for admin as follows: 4.1. Htop Htop is essentially an enhanced version of top. It comes with visual-style and built-in commands are needed for admin. 4.1.1. Try ‘htop’ ------------------------------------------------------------------------------------------------------------------- $ sudo apt install htop $ htop ------------------------------------------------------------------------------------------------------------------- <Sample output> 4.1.2. Test ‘htop’ with F1 – F10 Ubuntu Networking Part I Page 7 Lab 1: Network Troubleshooting Tools Name: 4.2. Try ‘atop’, ‘powertop’, ‘iotop’, and ‘apachetop’ Make your own note. 4.3. iftop iftop is similar to top, but it concerns only to network traffic on selected network interfaces and displays a table of current usage. You can find the answer why your Internet is very slow sometime. 4.3.1. Try ‘iftop’ ------------------------------------------------------------------------------------------------------------------- $ sudo apt install iftop $ sudo iftop ------------------------------------------------------------------------------------------------------------------- <Sample output> Ubuntu Networking Part I Page 8 Lab 1: Network Troubleshooting Tools Name: 4.3.2. Toggle ‘t’ to see what’s happening? Ubuntu Networking Part I Page 9 Lab 1: Network Troubleshooting Tools Name: 4.4. nethogs Nethogs display network traffic per protocol or per subnet. 4.4.1. Try ‘nethogs’ ------------------------------------------------------------------------------------------------------------------- $ sudo apt install nethogs $ sudo nethogs ------------------------------------------------------------------------------------------------------------------- <Sample output> 4.5. Try ‘ntopng’ and ‘jnettop’, Make your own note. Ubuntu Networking Part I Page 10 Lab 1: Network Troubleshooting Tools Name: 4.6. Bmon Bmon monitors and helps you debug networks. You can also interact with bmon through curses or through scripting. 4.6.1. Try ‘bmon’ ------------------------------------------------------------------------------------------------------------------- $ sudo apt install bmon $ sudo bmon ------------------------------------------------------------------------------------------------------------------- <Sample output>, toggle
Recommended publications
  • MLNX OFED Documentation Rev 5.0-2.1.8.0
    MLNX_OFED Documentation Rev 5.0-2.1.8.0 Exported on May/21/2020 06:13 AM https://docs.mellanox.com/x/JLV-AQ Notice This document is provided for information purposes only and shall not be regarded as a warranty of a certain functionality, condition, or quality of a product. NVIDIA Corporation (“NVIDIA”) makes no representations or warranties, expressed or implied, as to the accuracy or completeness of the information contained in this document and assumes no responsibility for any errors contained herein. NVIDIA shall have no liability for the consequences or use of such information or for any infringement of patents or other rights of third parties that may result from its use. This document is not a commitment to develop, release, or deliver any Material (defined below), code, or functionality. NVIDIA reserves the right to make corrections, modifications, enhancements, improvements, and any other changes to this document, at any time without notice. Customer should obtain the latest relevant information before placing orders and should verify that such information is current and complete. NVIDIA products are sold subject to the NVIDIA standard terms and conditions of sale supplied at the time of order acknowledgement, unless otherwise agreed in an individual sales agreement signed by authorized representatives of NVIDIA and customer (“Terms of Sale”). NVIDIA hereby expressly objects to applying any customer general terms and conditions with regards to the purchase of the NVIDIA product referenced in this document. No contractual obligations are formed either directly or indirectly by this document. NVIDIA products are not designed, authorized, or warranted to be suitable for use in medical, military, aircraft, space, or life support equipment, nor in applications where failure or malfunction of the NVIDIA product can reasonably be expected to result in personal injury, death, or property or environmental damage.
    [Show full text]
  • Oracle Database Licensing Information, 11G Release 2 (11.2) E10594-26
    Oracle® Database Licensing Information 11g Release 2 (11.2) E10594-26 July 2012 Oracle Database Licensing Information, 11g Release 2 (11.2) E10594-26 Copyright © 2004, 2012, Oracle and/or its affiliates. All rights reserved. Contributor: Manmeet Ahluwalia, Penny Avril, Charlie Berger, Michelle Bird, Carolyn Bruse, Rich Buchheim, Sandra Cheevers, Leo Cloutier, Bud Endress, Prabhaker Gongloor, Kevin Jernigan, Anil Khilani, Mughees Minhas, Trish McGonigle, Dennis MacNeil, Paul Narth, Anu Natarajan, Paul Needham, Martin Pena, Jill Robinson, Mark Townsend This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations.
    [Show full text]
  • Linux Hacking Case Studies Part 4: Sudo Horror Stories
    Linux Hacking Case Studies Part 4: Sudo Horror Stories written by Scott Sutherland | March 26, 2020 This blog will cover different ways to approach SSH password guessing and attacking sudo applications to gain a root shell on a Linux system. This case study commonly makes appearances in CTFs, but the general approach for attacking weak passwords and sudo applications can be applied to many real world environments. This should be a fun walk through for people new to penetration testing. This is the fourth of a five part blog series highlighting entry points and local privilege escalation paths commonly found on Linux systems during network penetration tests. Below are links to the first three blogs in the series: Linux Hacking Case Study Part 1: Rsync Linux Hacking Case Study Part 2: NFS Linux Hacking Case Study Part 3: phpMyAdmin Below is an overview of what will be covered in this blog: Finding SSH Servers Dictionary Attacks against SSH Servers Viewing Sudoers Execution Options Exploiting Sudo sh Exploiting Sudo VI Exploiting Sudo Python Exploiting Sudo Nmap Finding SSH Servers Before we can start password guessing or attacking sudo applications, we need to find some SSH servers to go after. Luckily Nmap and similar port scanning tools make that pretty easy because most vendors still run SSH on the default port of 22. Below is a sample Nmap command and screenshot to get you started. nmap -sS -sV -p22 192.168.1.0/24 -oA sshscan Once you’ve run the port scan you can quickly parse the results to make a file containing a list of SSH servers to target.
    [Show full text]
  • Linux Software User's Manual
    New Generation Systems (NGS) Linux Software User’s Manual Version 1.0, September 2019 www.moxa.com/product © 2019 Moxa Inc. All rights reserved. New Generation Systems (NGS) Linux Software User’s Manual The software described in this manual is furnished under a license agreement and may be used only in accordance with the terms of that agreement. Copyright Notice © 2019 Moxa Inc. All rights reserved. Trademarks The MOXA logo is a registered trademark of Moxa Inc. All other trademarks or registered marks in this manual belong to their respective manufacturers. Disclaimer Information in this document is subject to change without notice and does not represent a commitment on the part of Moxa. Moxa provides this document as is, without warranty of any kind, either expressed or implied, including, but not limited to, its particular purpose. Moxa reserves the right to make improvements and/or changes to this manual, or to the products and/or the programs described in this manual, at any time. Information provided in this manual is intended to be accurate and reliable. However, Moxa assumes no responsibility for its use, or for any infringements on the rights of third parties that may result from its use. This product might include unintentional technical or typographical errors. Changes are periodically made to the information herein to correct such errors, and these changes are incorporated into new editions of the publication. Technical Support Contact Information www.moxa.com/support Moxa Americas Moxa China (Shanghai office) Toll-free: 1-888-669-2872 Toll-free: 800-820-5036 Tel: +1-714-528-6777 Tel: +86-21-5258-9955 Fax: +1-714-528-6778 Fax: +86-21-5258-5505 Moxa Europe Moxa Asia-Pacific Tel: +49-89-3 70 03 99-0 Tel: +886-2-8919-1230 Fax: +49-89-3 70 03 99-99 Fax: +886-2-8919-1231 Moxa India Tel: +91-80-4172-9088 Fax: +91-80-4132-1045 Table of Contents 1.
    [Show full text]
  • Name Synopsis Description Options
    ovs−vlan−test(1) Open vSwitch Manual ovs−vlan−test(1) NAME ovs−vlan−test −check Linux drivers for problems with vlan traffic SYNOPSIS ovs−vlan−test [−s | −−server] control_ip vlan_ip Common options: [−h | −−help][−V | −−version] DESCRIPTION The ovs−vlan−test utility has some limitations, for example, it does not use TCP in its tests. Also it does not takeinto account MTU to detect potential edge cases. Toovercome those limitations a newtool was developed − ovs−test. ovs−test is currently supported only on Debian so, if possible try to use that on instead of ovs−vlan−test. The ovs−vlan−test program may be used to check for problems sending 802.1Q traffic which may occur when running Open vSwitch. These problems can occur when Open vSwitch is used to send 802.1Q traffic through physical interfaces running certain drivers of certain Linux kernel versions. Torun a test, configure Open vSwitch to tag traffic originating from vlan_ip and forward it out the target interface. Then run the ovs−vlan−test in client mode connecting to an ovs−vlan−test server. ovs−vlan−test will display "OK" if it did not detect problems. Some examples of the types of problems that may be encountered are: • When NICs use VLAN stripping on receive theymust pass a pointer to a vlan_group when reporting the stripped tag to the networking core. If no vlan_group is in use then some drivers just drop the extracted tag. Drivers are supposed to only enable stripping if a vlan_group is regis- tered but not all of them do that.
    [Show full text]
  • Getty Scholars' Workspace™ INSTALLATION INSTRUCTIONS
    Getty Scholars’ Workspace™ INSTALLATION INSTRUCTIONS This document outlines methods to run the application locally on your personal computer or to do a full installation on a web server. Test Drive with Docker Getty Scholars' Workspace is a multi-tenant web application, so it is intended to be run on a web server. However, if you'd like to run it on your personal computer just to give it a test drive, you can use Docker to create a virtual server environment and run the Workspace locally. Follow the steps below to give it a spin. Scroll further for real deployment instructions. 1. Install Docker on your machine. Follow instructions on the Docker website: https://www.docker.com/ 2. If you are using Docker Machine (Mac or Windows), be sure to start it by using the Docker Quickstart Terminal. Docker is configured to use the default machine with IP 192.168.99.100. 3. At the command line, pull the Getty Scholars' Workspace image. $ docker pull thegetty/scholarsworkspace 4. Run the container. $ docker run -d -p 8080:80 --name=wkspc thegetty/scholarsworkspace supervisord -n 5. Point your browser to `<ip address>:8080/GettyScholarsWorkspace`. Use the IP address noted in Step 2. 6. The Drupal administrator login is `scholar` and the password is `workspace`. Be sure to change these in the Drupal admin interface. 7. To shut it down, stop the container: $ docker stop wkspc Web Server Installation These installation instructions assume you are installing Getty Scholars' Workspace on a server (virtual or physical) with a clean new instance of Ubuntu 14.04 as the operating system.
    [Show full text]
  • MAX3946 1Gbps to 11.3Gbps, SFP+ Laser Driver with Laser Impedance
    19-5182; Rev 1; 5/11 EVALUATION KIT AVAILABLE 1Gbps to 11.3Gbps, SFP+ Laser Driver with Laser Impedance Mismatch Tolerance MAX3946 General Description Features The MAX3946 is a +3.3V, multirate, low-power laser S 225mW Power Dissipation Enables < 1W SFP+ diode driver designed for Ethernet and Fibre Channel Modules transmission systems at data rates up to 11.3Gbps. S Up to 100mW Power Consumption Reduction by This device is optimized to drive a differential transmit- Enabling the Use of Unmatched FP/DFB TOSAs ter optical subassembly (TOSA) with a 25I flex circuit. The unique design of the output stage enables use of S Supports SFF-8431 SFP+ MSA and SFF-8472 unmatched TOSAs, greatly reducing headroom limita- Digital Diagnostic tions and lowering power consumption. S 225mW Power Dissipation at 3.3V (IMOD = 40mA, The device receives differential CML-compatible signals IBIAS = 60mA Assuming 25I TOSA) with on-chip line termination. It can deliver laser modula- S Single +3.3V Power Supply tion current of up to 80mA, at an edge speed of 22ps S Up to 11.3Gbps (NRZ) Operation (20% to 80%), into a 5I to 25I external differential load. S Programmable Modulation Current from 10mA to The device is designed to have a symmetrical output 100mA (5I Load) stage with on-chip back terminations integrated into its outputs. A high-bandwidth, fully differential signal S Programmable Bias Current from 5mA to 80mA path is implemented to minimize deterministic jitter. An S Programmable Input Equalization equalization block can be activated to compensate for S Programmable Output Deemphasis the SFP+ connector.
    [Show full text]
  • Tao-Of-Tmux Documentation 发布 V1.0.2
    tao-of-tmux Documentation 发布 v1.0.2 Tony Narlock 2020 年 04 月 18 日 Contents 1 前言 3 1.1 关于本书 ............................................... 3 1.2 代码等风格说明 ........................................... 4 1.3 本书主要内容 ............................................. 4 1.4 打赏 .................................................. 5 1.5 书籍形式(Formats) ........................................ 5 1.6 勘误说明(Errata){#errata} ................................... 5 1.7 感谢 .................................................. 6 1.8 本书跟新和 tmux 的变动 ...................................... 6 2 tmux 初识 {#thinking-tmux} 7 2.1 terminal 的窗口管理器 ....................................... 8 2.2 多任务处理 .............................................. 9 2.3 在后台运行程序 ........................................... 10 2.4 Powerful combos ........................................... 11 2.5 小节 .................................................. 12 3 Terminal 基础知识(fundamentals){#terminal-fundamentals} 13 3.1 POSIX 标准 ............................................. 13 3.2 Terminal interface .......................................... 14 3.3 Terminal emulators ......................................... 15 3.4 Shell languages {#shell-languages} ................................ 15 3.5 Shell interpreters (Shells) {#shells} ................................ 15 3.6 小节 .................................................. 16 4 开始使用(Practical usage){#practical-usage} 17 4.1 前缀组合快捷键(prefix key ){#prefix-key} ........................... 17 4.2 Session persistence and the server model ............................. 19
    [Show full text]
  • BSD UNIX Toolbox 1000+ Commands for Freebsd, Openbsd
    76034ffirs.qxd:Toolbox 4/2/08 12:50 PM Page iii BSD UNIX® TOOLBOX 1000+ Commands for FreeBSD®, OpenBSD, and NetBSD®Power Users Christopher Negus François Caen 76034ffirs.qxd:Toolbox 4/2/08 12:50 PM Page ii 76034ffirs.qxd:Toolbox 4/2/08 12:50 PM Page i BSD UNIX® TOOLBOX 76034ffirs.qxd:Toolbox 4/2/08 12:50 PM Page ii 76034ffirs.qxd:Toolbox 4/2/08 12:50 PM Page iii BSD UNIX® TOOLBOX 1000+ Commands for FreeBSD®, OpenBSD, and NetBSD®Power Users Christopher Negus François Caen 76034ffirs.qxd:Toolbox 4/2/08 12:50 PM Page iv BSD UNIX® Toolbox: 1000+ Commands for FreeBSD®, OpenBSD, and NetBSD® Power Users Published by Wiley Publishing, Inc. 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright © 2008 by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 978-0-470-37603-4 Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 Library of Congress Cataloging-in-Publication Data is available from the publisher. 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, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permis- sion should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, or online at http://www.wiley.com/go/permissions.
    [Show full text]
  • Linux Pocket Guide.Pdf
    3rd Edition Linux Pocket Guide ESSENTIAL COMMANDS Daniel J. Barrett 3RD EDITION Linux Pocket Guide Daniel J. Barrett Linux Pocket Guide by Daniel J. Barrett Copyright © 2016 Daniel Barrett. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebasto‐ pol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promo‐ tional use. Online editions are also available for most titles (http://safaribook‐ sonline.com). For more information, contact our corporate/institutional sales department: 800-998-9938 or [email protected]. Editor: Nan Barber Production Editor: Nicholas Adams Copyeditor: Jasmine Kwityn Proofreader: Susan Moritz Indexer: Daniel Barrett Interior Designer: David Futato Cover Designer: Karen Montgomery Illustrator: Rebecca Demarest June 2016: Third Edition Revision History for the Third Edition 2016-05-27: First Release See http://oreilly.com/catalog/errata.csp?isbn=9781491927571 for release details. The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Linux Pocket Guide, the cover image, and related trade dress are trademarks of O’Reilly Media, Inc. While the publisher and the author have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and the author disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions contained in this work is at your own risk. If any code samples or other technology this work contains or describes is subject to open source licenses or the intellec‐ tual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights.
    [Show full text]
  • Traceroute Is One of the Key Tools Used for Network Troubleshooting and Scouting
    1 Introduction Traceroute is one of the key tools used for network troubleshooting and scouting. It has been available since networking's early days. Because traceroute is based on TTL header modification, it crafts its own network packets. The goal of this assignment is to re-implement a traceroute with cutting edge techniques designed to improve its scouting capabilities and bypass SPI firewalls. In this assignment you will learn about packet injection and sniffing. The assignment also teaches about more subtle topics such as network latency, packet filtering, and Q.O.S. 1.1 Instructions This project has to be completed sequentially as each part depends on the previous ones. The required coding language is C. You should consider using libnet [1] and libpcap [2], however using raw sockets is permitted as well. Note that the exercises become progressively more difficult, with Exercise 5 likely to consume the greatest amount of effort. 1.2 Submission and Grading To compile your project, the script will use the command make, executed in the project directory. Then it will launch our tests, using an executable name "traceng" you have to make sure your make file results in this executable name, in the same project directory. Make sure that the command line options and the output format are correctly implemented as they will be used by our script during the grading process. Specific examples of how we are going to test your executable are provided later in this document, for each exercise. Your project directory should also contain a file called README which is text file describing the highlights of your solution to each exercise anything special that you did, information required in the specific exercise, what is the most interesting thing you learned in the exercise, and anything else we need to take into account.
    [Show full text]
  • The Bioinformatics Lab Linux Proficiency Terminal-Based Text Editors Version Control Systems
    The Bioinformatics Lab Linux proficiency terminal-based text editors version control systems Jonas Reeb 30.04.2013 “What makes you proficient on the command line?” - General ideas I Use CLIs in the first place I Use each tool for what it does best I Chain tools for more complex tasks I Use power of shell for small scripting jobs I Automate repeating tasks I Knowledge of regular expression 1 / 22 Standard tools I man I ls/cd/mkdir/rm/touch/cp/mv/chmod/cat... I grep, sort, uniq I find I wget/curl I scp/ssh I top(/htop/iftop/iotop) I bg/fg 2 / 22 Input-Output RedirectionI By default three streams (“files”) open Name Descriptor stdin 0 stdout 1 stderr 2 Any program can check for its file descriptors’ redirection! (isatty) 3 / 22 Input-Output RedirectionII Output I M>f Redirect file descriptor M to file f, e.g. 1>f I Use >> for appending I &>f Redirect stdout and stderr to f I M>&N Redirect fd M to fd N Input I 0<f Read from file f 4 / 22 Pipes I Forward output of one program to input of another I Essential for Unix philosophy of specialized tools I grep -P -v "^>" *.fa | sort -u > seqs I Input and arguments are different things. Use xargs for arguments: ls *.fa | xargs rm 5 / 22 Scripting I Quick way to get basic programs running I Basic layout: #!/bin/bash if test"$1" then count=$1 else count=0 fi for i in {1..10} do echo $((i+count)) let"count +=1" done 6 / 22 Motivation - “What makes a good text editor” I Fast execution, little system load I Little bandwidth needed I Available for all (your) major platforms –> Familiar environment I Fully controllable via keyboard I Extensible and customizable I Auto-indent, Auto-complete, Syntax highlighting, Folding, ..
    [Show full text]