You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/linux/sql-server-linux-dmv-tool.md
+25-54Lines changed: 25 additions & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,17 @@
1
1
---
2
2
# required metadata
3
3
4
-
title: Monitor SQL Server on Linux with dmvtool - SQL Server vNext CTP1 | Microsoft Docs
5
-
description: This topic describes how to monitor SQL Server running on Linux with the dmvtool.
4
+
title: Monitor SQL Server on Linux with dmvtool | SQL Server vNext CTP1
5
+
description:
6
6
author: rothja
7
7
ms.author: jroth
8
8
manager: jhubbard
9
-
ms.date: 11/08/2016
9
+
ms.date: 10-19-2016
10
10
ms.topic: article
11
-
ms.prod: sql-linux
12
-
ms.technology: database-engine
13
-
ms.assetid: 2856cc89-d35b-4030-b12e-4c4ff9240706
11
+
ms.prod: sql-non-specified
12
+
ms.service:
13
+
ms.technology:
14
+
ms.assetid:
14
15
15
16
# optional metadata
16
17
@@ -37,46 +38,14 @@ DMVTool uses the FUSE file system module to create two zero byte files for each
37
38
> [!NOTE]
38
39
> Viewing the contents of DMVs in JSON format is only available when connected to a SQL Server 2016 or higher version of SQL Server. DMVTool can connect to local SQL Servers running on Linux and remote SQL Servers running on Windows or Linux. For now, DMVTool is only a Linux-based tool.
39
40
40
-
## Installing DMVTool
41
+
## 1. Install DMVTool
41
42
42
-
### To install on Ubuntu
43
-
44
-
$ sudo apt-get install dmvtool
45
-
46
-
> [!NOTE]
47
-
> This assumes that you have already configured your server to install the mssql-tools package. If you have not done that already, please see the Installation Guide for instructions on doing that first.
The DMV tool needs a config file and an empty directory to mount and create the virtual files in. The config file allows you to specify the hostname, username, password (optionally), and SQL Server version for all the servers you want to manage using DMVTool. The version attribute needs to be 14 (SQL Server 2014) or 16 (SQL Server 2016 or higher).
82
51
@@ -86,16 +55,16 @@ The DMV tool needs a config file and an empty directory to mount and create the
86
55
87
56
$ mkdir dmv
88
57
89
-
1. Create a file to store the configuration
58
+
3. Create a file to store the configuration
90
59
91
60
$ touch dmvtool.config
92
61
93
-
1. Edit the config file using an editor like VI
62
+
4. Edit the config file using an editor like VI
94
63
95
-
$ vi dmvtool.config
64
+
$ vi dmvtool.config
96
65
97
66
The config file should be in the following format:
You should see the list of your server friendly names.
140
109
141
-
$ cd <server friendly name>
110
+
$ cd <server friendly name>
142
111
$ ls
143
112
144
113
You should see the list of DMVs as files. Look at the contents of one of the files:
145
114
146
-
$ more <dmv file name>
115
+
$ more <dmv file name>
147
116
148
117
You can pipe the output from DMVTool to tools like [*cut*](https://en.wikipedia.org/wiki/Cut_(Unix)) (CSV) and [*jq*](https://stedolan.github.io/jq/) (JSON) to format the data for better readability.
149
118
119
+
## 4. Stop DMVtool
120
+
150
121
By default, DMVTool runs in background. You can shut it down using the following commands:
151
122
152
123
ps -A | grep dmvtool
153
124
154
-
kill -2 <dmvtool pid>
125
+
kill -2 <dmvtool pid>;
155
126
156
127
If you want to run it in the foreground you can pass the -f parameter. You can pass the -v parameter for verbose output if you are running the tool in the foreground.
0 commit comments