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

process list?

  • 03-01-2002 10:06am
    #1
    Registered Users, Registered Users 2 Posts: 6,265 ✭✭✭


    ps -ef | grep radius_listener
    ps -ef | grep smpp_gateway
    ps -ef | grep certificate_handler
    ps -ef | grep connectionless
    ps -ef | grep connection_oriented
    ps -ef | grep secure_connectionless
    ps -ef | grep secure_connection_oriented
    ps -ef | grep whttp
    ps -ef | grep apacheuser
    ps -ef | grep push_delivery_service
    ps -ef | grep charging
    ps -ef | grep stats

    that is in a script
    output:

    miepadm 17414 1 0 10:51:45 pts/8 0:00 ./radius_listener
    miepadm 18108 18106 0 11:03:58 pts/8 0:00 grep radius_listener
    miepadm 17415 1 0 10:51:45 pts/8 0:00 ./smpp_gateway
    miepadm 18110 18106 0 11:03:58 pts/8 0:00 grep smpp_gateway
    miepadm 17416 1 0 10:51:45 pts/8 0:00 ./certificate_handler
    miepadm 18112 18106 0 11:03:58 pts/8 0:00 grep certificate_handler
    miepadm 18114 18106 0 11:03:58 pts/8 0:00 grep connectionless
    miepadm 17417 1 0 10:51:45 pts/8 0:01 ./connectionless
    miepadm 18116 18106 0 11:03:58 pts/8 0:00 grep connection_oriented
    miepadm 17418 1 0 10:51:45 pts/8 0:03 ./connection_oriented
    miepadm 18118 18106 0 11:03:58 pts/8 0:00 grep secure_connectionless
    miepadm 18120 18106 0 11:03:58 pts/8 0:00 grep secure_connection_oriented
    miepadm 18122 18106 0 11:03:58 pts/8 0:00 grep whttp
    miepadm 17421 1 0 10:51:45 pts/8 0:01 ./whttp
    miepadm 18124 18106 0 11:03:58 pts/8 0:00 grep apacheuser
    miepadm 18126 18106 0 11:03:58 pts/8 0:00 grep push_delivery_service
    miepadm 17423 1 0 10:51:45 pts/8 0:00 ./push_delivery_service
    miepadm 18128 18106 0 11:03:59 pts/8 0:00 grep charging
    miepadm 17410 1 0 10:51:45 pts/8 0:00 ./charging
    miepadm 18130 18106 0 11:03:59 pts/8 0:00 grep stats
    miepadm 17411 1 0 10:51:45 pts/8 0:00 ./stats

    i want to get rid of the grep bits.
    any ideas?

    MiCr0


Comments

  • Registered Users, Registered Users 2 Posts: 1,562 ✭✭✭Snaga


    <snip silly answer>

    nm redoing that attempt :D


  • Registered Users, Registered Users 2 Posts: 1,982 ✭✭✭ObeyGiant


    (kludgy - may be a "prettier" way of doing this)
    Throw a 'grep -v grep' at the end of each of those?
    e.g.
    ps -ef | grep radius_listener | grep -v grep
    


  • Registered Users, Registered Users 2 Posts: 171 ✭✭Wookie


    try:

    ps -ef | grep radius_listener | grep -v grep
    ...
    ...


    in your script, it should give you a 'cleaner' output


  • Moderators, Social & Fun Moderators Posts: 10,501 Mod ✭✭✭✭ecksor


    ps -ef | grep '[r]adius_listener'
    ...
    ...


  • Registered Users, Registered Users 2 Posts: 171 ✭✭Wookie


    Ok Now for complete overkill :)

    Modify script as follows:

    ps -ef | grep radius_listener | grep -q -v grep
    if [ $? = 0 ]
    then
    echo 'radius_listener: Successful'
    else
    echo 'radius_listener: Unsuccessful'
    fi

    ps -ef | grep smpp_gateway | grep -q -v grep
    if [ $? = 0 ]
    then
    echo 'smpp_gateway : Successful'
    else
    echo 'smpp_gateway : Unsuccessful'
    fi

    . . .


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 6,265 ✭✭✭MiCr0


    and if u throw in a 1>/dev/null @ the end of the search line its even better.

    cheers
    //david


Advertisement