Skip to content

Commit

Permalink
Remove debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
pragma- committed Dec 25, 2024
1 parent b4d2848 commit 9fd49de
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ options:
-c COMMAND, --command COMMAND
User command to feed data into graph [example: ps -eo rss,pid,comm --no-headers]
-s STREAM, --stream STREAM
Streaming user command to feed data into graph [example: tail -f file]
Streaming user command to feed data into graph [example: tail -f logfile]
-f [FILE], --file [FILE]
Continuously read file or STDIN to feed data into graph
-r REFRESHRATE, --refreshrate REFRESHRATE
Expand Down Expand Up @@ -128,11 +128,11 @@ For example:
-s STREAM, --stream STREAM

Grafmon will invoke the command once and expects the command to remain running. This is ideal for
fetching data from a long-running process or server.
fetching data from a long-running process or log file.

For example:

grafmon -s 'tail -f file -n0'
grafmon -s 'tail -f logfile -n0'
grafmon -s 'socat UNIX-LISTEN:data.sock -'

## File or STDIN
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "grafmon"
version = "1.1.0"
version = "1.1.1"
dependencies = [
"pyqtgraph",
"PyQt6",
Expand Down
5 changes: 0 additions & 5 deletions src/grafmon/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,28 +79,23 @@ def initFromArgs(self, args: list[str] | None = None):
sys.exit(0)

if args.monitor:
print("args.monitor")
self.monitor_type = MonitorType.BUILTIN
monitor = os.path.join(os.path.dirname(__file__), 'monitors', args.monitor)
if not os.path.exists(monitor):
print(f"No such builtin monitor `{args.monitor}`. Use `--list-monitors` to list available builtin monitors.")
sys.exit(1)
self.monitor_cmd = monitor
elif args.command:
print("args.command")
self.monitor_type = MonitorType.COMMAND
self.monitor_cmd = args.command
elif args.stream:
print("args.stream")
self.monitor_type = MonitorType.STREAM
self.monitor_cmd = args.stream
elif args.file:
print("args.file")
self.monitor_type = MonitorType.FILE
self.monitor_cmd = args.file
else:
# default to pcpu builtin monitor
print("default pcpu")
self.monitor_type = MonitorType.BUILTIN
pcpu = os.path.join(os.path.dirname(__file__), 'monitors', 'pcpu')
self.monitor_cmd = pcpu
Expand Down
5 changes: 1 addition & 4 deletions src/grafmon/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,8 @@ def create_window(self):
self.gridLayout = QtWidgets.QGridLayout(self.layoutWidgetL)
self.gridLayout.setContentsMargins(0, 0, 0, 0)
self.filter = QtWidgets.QLineEdit(self.layoutWidgetL)
self.filter.setObjectName("filter")
self.filter.setVisible(False)
self.gridLayout.addWidget(self.filter, 0, 0, 1, 2)
self.tree = QtWidgets.QTreeWidget(self.layoutWidgetL)
self.tree.setObjectName("tree")
self.tree.setHeaderLabels(["Item", "Value"])
self.tree.setMinimumSize(275, 150)
self.tree.setSortingEnabled(True)
Expand Down Expand Up @@ -131,7 +128,7 @@ def about(self):
QtWidgets.QMessageBox.about(
self,
"About grafmon",
"<h1><center>grafmon 1.1.0</center></h1>"
"<h1><center>grafmon 1.1.1</center></h1>"
"<h2><p>Copyright &copy; 2024-2025 <a href='https://github.com/pragma-'>Pragmatic Software<a></h2>"
"<hr>"
"<h3><p><a href='https://github.com/pragma-/grafmon'>https://github.com/pragma-/grafmon</a>"
Expand Down

0 comments on commit 9fd49de

Please sign in to comment.