aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngelo Marletta <angelo.marletta@gmail.com>2012-06-24 00:59:45 +0100
committerAngelo Marletta <angelo.marletta@gmail.com>2012-06-24 00:59:45 +0100
commitf05ae7de8d93658f835073135d04174580acfb8a (patch)
tree8e963fb37ea05ec27db44dacc9a1d6011f3440d5
parent06fd0fd1e25fb2dd4fbcd265c3643b3e249e86eb (diff)
downloadcpulimit-f05ae7de8d93658f835073135d04174580acfb8a.tar.gz
updated copyright header
-rw-r--r--src/cpulimit.c24
-rw-r--r--src/list.c43
-rw-r--r--src/list.h9
-rw-r--r--src/process_group.c21
-rw-r--r--src/process_group.h4
-rw-r--r--src/process_iterator.c21
-rw-r--r--src/process_iterator.h4
-rw-r--r--src/process_iterator_apple.c21
-rw-r--r--src/process_iterator_freebsd.c21
-rw-r--r--src/process_iterator_linux.c21
-rw-r--r--tests/process_iterator_test.c21
11 files changed, 155 insertions, 55 deletions
diff --git a/src/cpulimit.c b/src/cpulimit.c
index 394b132..5353b90 100644
--- a/src/cpulimit.c
+++ b/src/cpulimit.c
@@ -1,8 +1,8 @@
/**
*
- * cpulimit - a cpu limiter for Linux
+ * cpulimit - a CPU limiter for Linux
*
- * Copyright (C) 2005-2008, by: Angelo Marletta <marlonx80@hotmail.com>
+ * Copyright (C) 2005-2012, by: Angelo Marletta <angelo dot marletta at gmail dot com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -18,28 +18,12 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- **********************************************************************
+ **************************************************************
*
* This is a simple program to limit the cpu usage of a process
* If you modify this code, send me a copy please
*
- * Date: 30/8/2008
- * Version: 1.2 beta
- * Get the latest version at: http://cpulimit.sourceforge.net
- *
- * Changelog from 1.1:
- * - reorganization of the code, splitted in more source files
- * - cpu count detection, i.e. if you have 4 cpu, it is possible to limit up to 400%
- * - in order to avoid deadlocks, cpulimit now prevents to limit itself
- * - option --path eliminated, use --exe instead both for absolute path and file name
- * - call setpriority() just once in limit_process()
- * - no more segmentation fault when processes exit
- * - no more memory corruption when processes exit
- * - cpulimit exits if --lazy option is specified and the process terminates
- * - target process can be created on-fly given command line
- * - light and scalable algorithm for subprocesses detection and limitation
- * - mac os support
- * - minor enhancements and bugfixes
+ * Get the latest version at: http://github.com/opsengine/cpulimit
*
*/
diff --git a/src/list.c b/src/list.c
index 6fe1e06..a1c20a3 100644
--- a/src/list.c
+++ b/src/list.c
@@ -1,28 +1,23 @@
/**
-*
-* cpulimit - a cpu limiter for Linux
-*
-* Copyright (C) 2005-2008, by: Angelo Marletta <marlonx80@hotmail.com>
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-*
-**********************************************************************
-*
-* Dynamic list implementation
-*
-*/
+ *
+ * cpulimit - a CPU limiter for Linux
+ *
+ * Copyright (C) 2005-2012, by: Angelo Marletta <angelo dot marletta at gmail dot com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
#include <stdlib.h>
#include <string.h>
diff --git a/src/list.h b/src/list.h
index 478635f..0b43a2b 100644
--- a/src/list.h
+++ b/src/list.h
@@ -1,8 +1,8 @@
/**
*
- * cpulimit - a cpu limiter for Linux
+ * cpulimit - a CPU limiter for Linux
*
- * Copyright (C) 2005-2008, by: Angelo Marletta <marlonx80@hotmail.com>
+ * Copyright (C) 2005-2012, by: Angelo Marletta <angelo dot marletta at gmail dot com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -17,11 +17,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- **********************************************************************
- *
- * Dynamic list interface
- *
*/
#ifndef __LIST__
diff --git a/src/process_group.c b/src/process_group.c
index 71f180b..671dd73 100644
--- a/src/process_group.c
+++ b/src/process_group.c
@@ -1,3 +1,24 @@
+/**
+ *
+ * cpulimit - a CPU limiter for Linux
+ *
+ * Copyright (C) 2005-2012, by: Angelo Marletta <angelo dot marletta at gmail dot com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
#include <string.h>
#include <stdlib.h>
#include <limits.h>
diff --git a/src/process_group.h b/src/process_group.h
index 100711d..ab86816 100644
--- a/src/process_group.h
+++ b/src/process_group.h
@@ -1,8 +1,8 @@
/**
*
- * cpulimit - a cpu limiter for Linux
+ * cpulimit - a CPU limiter for Linux
*
- * Copyright (C) 2005-2012, by: Angelo Marletta <marlonx80@hotmail.com>
+ * Copyright (C) 2005-2012, by: Angelo Marletta <angelo dot marletta at gmail dot com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
diff --git a/src/process_iterator.c b/src/process_iterator.c
index 0e31c81..165f420 100644
--- a/src/process_iterator.c
+++ b/src/process_iterator.c
@@ -1,3 +1,24 @@
+/**
+ *
+ * cpulimit - a CPU limiter for Linux
+ *
+ * Copyright (C) 2005-2012, by: Angelo Marletta <angelo dot marletta at gmail dot com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/process_iterator.h b/src/process_iterator.h
index 82fadac..ecbe995 100644
--- a/src/process_iterator.h
+++ b/src/process_iterator.h
@@ -1,8 +1,8 @@
/**
*
- * cpulimit - a cpu limiter for Linux
+ * cpulimit - a CPU limiter for Linux
*
- * Copyright (C) 2005-2012, by: Angelo Marletta <marlonx80@hotmail.com>
+ * Copyright (C) 2005-2012, by: Angelo Marletta <angelo dot marletta at gmail dot com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
diff --git a/src/process_iterator_apple.c b/src/process_iterator_apple.c
index ee574e7..d7aa5f3 100644
--- a/src/process_iterator_apple.c
+++ b/src/process_iterator_apple.c
@@ -1,3 +1,24 @@
+/**
+ *
+ * cpulimit - a CPU limiter for Linux
+ *
+ * Copyright (C) 2005-2012, by: Angelo Marletta <angelo dot marletta at gmail dot com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
int init_process_iterator(struct process_iterator *it) {
return 0;
}
diff --git a/src/process_iterator_freebsd.c b/src/process_iterator_freebsd.c
index eb6cfaa..a4bf38f 100644
--- a/src/process_iterator_freebsd.c
+++ b/src/process_iterator_freebsd.c
@@ -1,3 +1,24 @@
+/**
+ *
+ * cpulimit - a CPU limiter for Linux
+ *
+ * Copyright (C) 2005-2012, by: Angelo Marletta <angelo dot marletta at gmail dot com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
#include <sys/sysctl.h>
#include <sys/user.h>
#include <fcntl.h>
diff --git a/src/process_iterator_linux.c b/src/process_iterator_linux.c
index a15be45..9e2f7f2 100644
--- a/src/process_iterator_linux.c
+++ b/src/process_iterator_linux.c
@@ -1,3 +1,24 @@
+/**
+ *
+ * cpulimit - a CPU limiter for Linux
+ *
+ * Copyright (C) 2005-2012, by: Angelo Marletta <angelo dot marletta at gmail dot com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
#include <sys/vfs.h>
static int get_boot_time()
diff --git a/tests/process_iterator_test.c b/tests/process_iterator_test.c
index f5b7586..7b1c6b5 100644
--- a/tests/process_iterator_test.c
+++ b/tests/process_iterator_test.c
@@ -1,3 +1,24 @@
+/**
+ *
+ * cpulimit - a CPU limiter for Linux
+ *
+ * Copyright (C) 2005-2012, by: Angelo Marletta <angelo dot marletta at gmail dot com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
Un proyecto texto-plano.xyz