Sponsored Content
Top Forums Shell Programming and Scripting Cancel process running for more than 5 days Post 302953897 by MadeInGermany on Wednesday 2nd of September 2015 01:02:44 PM
Old 09-02-2015
Pure Posix / quite portable is
Code:
ps -e -o pid= -o etime= -o args=

The etime has the further advantage that it is already the difference current_date - stime.
For example
Code:
ps -e -o pid= -o etime= -o args= |
  while read pid etime args
  do
    case $args in
    *lp -c* )
      case $etime in
      5-* | [0-9][0-9]*-* )
        echo kill "$pid"
      ;;
      esac
    ;;
    esac
  done

This User Gave Thanks to MadeInGermany For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script to monitor process running on server and posting a mail if any process is dead

Hello all, I would be happy if any one could help me with a shell script that would determine all the processes running on a Unix server and post a mail if any of the process is not running or aborted. Thanks in advance Regards, pradeep kulkarni. :mad: (13 Replies)
Discussion started by: pradeepmacha
13 Replies

2. AIX

etime - get processes running for more than 30 days

In AIX I am trying to get the processes ran by user declan using the following format: ps -aef -o user,pid,etime,args | grep declan Then I get a result similar to (for example): declan 103264 123-12:47:33 /applications/apache/1.3.39.0/bin/httpd -d /var/applications/apache/www1 ... (0 Replies)
Discussion started by: chipahoys
0 Replies

3. UNIX for Dummies Questions & Answers

how to cancel a cronjob if the cronjob still running

hi everyone I'm newbie in this forum hope I can get some help here :) I have a command in crontab that executed every 1 minute sometime this command need more than 1 minute to finish the problem is, the crontab execute this command although it's not finish processing yet and causing the system... (7 Replies)
Discussion started by: 2j4h
7 Replies

4. Shell Programming and Scripting

Cron job running for some days and is not running for some days

Hi.. i have written a shell script and made this script to run on every day night 11: 55 pm using a cron job. This cron job running for some days and is not running for some day. but i need this script to run every day night. Please help me. Here is the cron tab entries, 55 23 * * *... (1 Reply)
Discussion started by: vidhyaS
1 Replies

5. Shell Programming and Scripting

Process previous days file

Hi, i've a scenario where i need to unizp the previous day files based on the no of days given as input. EX: if my no of days are 5 i need to go to archive dir and pull last 5 days files from currentday -1 . Please help with this shell script. Regards, sandeep. (5 Replies)
Discussion started by: sandeep karna
5 Replies

6. BSD

Process remians in Running state causing other similar process to sleep and results to system hang

Hi Experts, I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state. On doing cat /proc/<pid>wchan showing the "__init_begin" in the output. Can you please help me here... (0 Replies)
Discussion started by: naveeng
0 Replies

7. UNIX for Advanced & Expert Users

Process remians in Running state causing other similar process to sleep and results to system hang

Hi Experts, I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state. On doing cat /proc/<pid>wchan showing the "__init_begin" in the output. Can you please help me here... (1 Reply)
Discussion started by: naveeng
1 Replies

8. UNIX for Advanced & Expert Users

Process remians in Running state causing other similar process to sleep and results to system hang

Hi Experts, I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state. On doing cat /proc/<pid>wchan showing the "__init_begin" in the output. Can you please help me here... (6 Replies)
Discussion started by: naveeng
6 Replies

9. Shell Programming and Scripting

Shell script to find out process name that are running for last 10 days.

Hi all, As i am new to shell script.Please help me to write a Shell script to find out process name that are running for last 10 days. Thank's in advance. (8 Replies)
Discussion started by: manas_1988
8 Replies

10. Shell Programming and Scripting

Command to get exact tomcat process I am running ignoring other java process

Team, I have multiple batchjobs running in VM, if I do ps -ef |grep java or tomcat I am getting multiple process list. How do I get my exact tomcat process running and that is unique? via shell script? (4 Replies)
Discussion started by: Ghanshyam Ratho
4 Replies
Gnome2::Canvas::Item(3pm)				User Contributed Perl Documentation				 Gnome2::Canvas::Item(3pm)

NAME
Gnome2::Canvas::Item - Base class for all canvas items HIERARCHY
Glib::Object +----Glib::InitiallyUnowned +----Gtk2::Object +----Gnome2::Canvas::Item METHODS
item = Gnome2::Canvas::Item->new ($parent, $object_class, ...) o $parent (Gnome2::Canvas::Group) o $object_class (string) o ... (list) property name => value pairs Factory constructor for Gnome2::Canvas::Item subclasses. $item->affine_absolute ($affine) o $affine (arrayref) affine transformation matrix Replaces $item's transformation matrix. $item->affine_relative ($affine) o $affine (arrayref) affine transformation matrix Combines $affine with $item's current transformation. (x1, y1, x2, y2) = $item->get_bounds $canvas = $item->canvas Fetch the Gnome2::Canvas to which $item is attached. grabstatus = $item->grab ($event_mask, $cursor, $etime=GDK_CURRENT_TIME) o $event_mask (Gtk2::Gdk::EventMask) o $cursor (Gtk2::Gdk::Cursor) o $etime (unsigned) $item->grab_focus $item->hide $affine = $item->i2c_affine Fetch the affine transform that converts from item-relative coordinates to canvas pixel coordinates. Note: This method was completely broken for all $Gnome2::Canvas::VERSION < 1.002. (x, y) = $item->i2w ($x, $y) o $x (double) o $y (double) $affine = $item->i2w_affine Fetch the affine transform that converts from item's coordinate system to world coordinates. Note: This method was completely broken for all $Gnome2::Canvas::VERSION < 1.002. $item->lower ($positions) o $positions (integer) $item->lower_to_bottom $item->move ($dx, $dy) o $dx (double) o $dy (double) $canvasgroup = $item->parent Fetch $item's parent group item. $item->raise ($positions) o $positions (integer) $item->raise_to_top $item->reparent ($new_group) o $new_group (Gnome2::Canvas::Group) $item->request_update $item->reset_bounds Reset the bounding box of $item to an empty rectangle. $item->show $item->ungrab ($etime=GDK_CURRENT_TIME) o $etime (unsigned) $item->update_bbox ($x1, $y1, $x2, $y2) o $x1 (integer) o $y1 (integer) o $x2 (integer) o $y2 (integer) Set $item's bounding box to a new rectangle, and request a full repaint. (x, y) = $item->w2i ($x, $y) o $x (double) o $y (double) PROPERTIES
'parent' (Gnome2::Canvas::Item : default undef : readable / writable) SIGNALS
boolean = event (Gnome2::Canvas::Item, Gtk2::Gdk::Event) ENUMS AND FLAGS
flags Gtk2::Gdk::EventMask o 'exposure-mask' / 'GDK_EXPOSURE_MASK' o 'pointer-motion-mask' / 'GDK_POINTER_MOTION_MASK' o 'pointer-motion-hint-mask' / 'GDK_POINTER_MOTION_HINT_MASK' o 'button-motion-mask' / 'GDK_BUTTON_MOTION_MASK' o 'button1-motion-mask' / 'GDK_BUTTON1_MOTION_MASK' o 'button2-motion-mask' / 'GDK_BUTTON2_MOTION_MASK' o 'button3-motion-mask' / 'GDK_BUTTON3_MOTION_MASK' o 'button-press-mask' / 'GDK_BUTTON_PRESS_MASK' o 'button-release-mask' / 'GDK_BUTTON_RELEASE_MASK' o 'key-press-mask' / 'GDK_KEY_PRESS_MASK' o 'key-release-mask' / 'GDK_KEY_RELEASE_MASK' o 'enter-notify-mask' / 'GDK_ENTER_NOTIFY_MASK' o 'leave-notify-mask' / 'GDK_LEAVE_NOTIFY_MASK' o 'focus-change-mask' / 'GDK_FOCUS_CHANGE_MASK' o 'structure-mask' / 'GDK_STRUCTURE_MASK' o 'property-change-mask' / 'GDK_PROPERTY_CHANGE_MASK' o 'visibility-notify-mask' / 'GDK_VISIBILITY_NOTIFY_MASK' o 'proximity-in-mask' / 'GDK_PROXIMITY_IN_MASK' o 'proximity-out-mask' / 'GDK_PROXIMITY_OUT_MASK' o 'substructure-mask' / 'GDK_SUBSTRUCTURE_MASK' o 'scroll-mask' / 'GDK_SCROLL_MASK' o 'all-events-mask' / 'GDK_ALL_EVENTS_MASK' enum Gtk2::Gdk::GrabStatus o 'success' / 'GDK_GRAB_SUCCESS' o 'already-grabbed' / 'GDK_GRAB_ALREADY_GRABBED' o 'invalid-time' / 'GDK_GRAB_INVALID_TIME' o 'not-viewable' / 'GDK_GRAB_NOT_VIEWABLE' o 'frozen' / 'GDK_GRAB_FROZEN' SEE ALSO
Gnome2::Canvas, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object COPYRIGHT
Copyright (C) 2003-2004 by the Gtk2-Perl Team. This software is licensed under the LGPL; see Gnome2::Canvas for a full notice. perl v5.14.2 2011-11-16 Gnome2::Canvas::Item(3pm)
All times are GMT -4. The time now is 04:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy