Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Linux Ubuntu - How to clean up connections

  • 18-03-2011 6:14pm
    #1
    Closed Accounts Posts: 2,696 ✭✭✭


    when i do a netstat on linux ubuntu i have a lot of the below crap - how do i remove all this?


    unix  3      [ ]         STREAM     CONNECTED     13014    
    unix  3      [ ]         STREAM     CONNECTED     12932    @/tmp/dbus-jjHDnQ2uVU
    unix  3      [ ]         STREAM     CONNECTED     12931    
    unix  3      [ ]         STREAM     CONNECTED     12928    /var/run/dbus/system_bus_socket
    unix  3      [ ]         STREAM     CONNECTED     12927    
    unix  3      [ ]         STREAM     CONNECTED     12922    
    unix  3      [ ]         STREAM     CONNECTED     12921    
    unix  3      [ ]         STREAM     CONNECTED     12917    /tmp/orbit-johnroo/linc-690-0-409c947966cb0
    unix  3      [ ]         STREAM     CONNECTED     12916    
    unix  3      [ ]         STREAM     CONNECTED     12913    /tmp/orbit-johnroo/linc-5c2-0-2defecea2b8c5
    


Comments

  • Closed Accounts Posts: 4,564 ✭✭✭Naikon


    john47832 wrote: »
    when i do a netstat on linux ubuntu i have a lot of the below crap - how do i remove all this?


    unix  3      [ ]         STREAM     CONNECTED     13014    
    unix  3      [ ]         STREAM     CONNECTED     12932    @/tmp/dbus-jjHDnQ2uVU
    unix  3      [ ]         STREAM     CONNECTED     12931    
    unix  3      [ ]         STREAM     CONNECTED     12928    /var/run/dbus/system_bus_socket
    unix  3      [ ]         STREAM     CONNECTED     12927    
    unix  3      [ ]         STREAM     CONNECTED     12922    
    unix  3      [ ]         STREAM     CONNECTED     12921    
    unix  3      [ ]         STREAM     CONNECTED     12917    /tmp/orbit-johnroo/linc-690-0-409c947966cb0
    unix  3      [ ]         STREAM     CONNECTED     12916    
    unix  3      [ ]         STREAM     CONNECTED     12913    /tmp/orbit-johnroo/linc-5c2-0-2defecea2b8c5
    

    I can't speak for everyone else, but this command can usually solve most problems:
    man netstat
    


  • Closed Accounts Posts: 2,696 ✭✭✭mark renton


    not exactly what i was looking for - do you know how to get rid of these


  • Closed Accounts Posts: 4,564 ✭✭✭Naikon


    john47832 wrote: »
    not exactly what i was looking for - do you know how to get rid of these

    Rid of what? The point of netstat is to print networking related information to stdout. From the output you posted, it appears to be doing exactly that. Basic assumptions about output format is made by netstat, but beyond that, you have to supply additional arguments to control the output you want the command to produce, generally. What information are you looking for specifically? For example, if I want SELinux context information, add -Z as an argument. The documentation covers the most important info.


  • Registered Users, Registered Users 2 Posts: 9,579 ✭✭✭Webmonkey


    As said above that's just printing out information. Why do you want to clear this? :confused:


  • Closed Accounts Posts: 4,564 ✭✭✭Naikon


    To answer your question literally though op, you can redirect the output from netstat to /dev/null if you don't like commands spilling useful information all over your monitor.


  • Advertisement
  • Moderators, Arts Moderators Posts: 35,788 Mod ✭✭✭✭pickarooney


    Going by the thread title I presume the OP wants to disconnect all the connections listed as opposed to how to use netstat?

    Just checked myself and I have 6 connections from www.irishtimes.com although I haven't been on the site in over a week and have rebooted several times since.


  • Registered Users, Registered Users 2 Posts: 7,518 ✭✭✭matrim


    If you want to hide the stream items from showing up in netstat results you can use the -u and \ or -t commands to only show UDP and TCP connections


  • Closed Accounts Posts: 2,696 ✭✭✭mark renton


    Forgive my linux ignorance - but if i do a netstat on windows and it is listed as "Connected" then i have a remote connection - if i reboot then windows clears the connections - no?


    even if i reboot linux these connections are still there and this makes me think this will impede performance - am i wrong? are these valid connections or just listings of previous connections?


  • Registered Users, Registered Users 2 Posts: 354 ✭✭AndrewMc


    These are "unix domain sockets", they're how processes normally communicate with each other. Don't worry about them.


  • Registered Users, Registered Users 2 Posts: 354 ✭✭AndrewMc


    Just checked myself and I have 6 connections from www.irishtimes.com although I haven't been on the site in over a week and have rebooted several times since.

    If you add the "-p" flag netstat will tell you what process has opened the connection. Do you have an RSS reader or one of those RSS bookmarks in Firefox, perhaps?


  • Advertisement
Advertisement