From b70e58ce8571985543ac44c3590a0d9132e9c09e Mon Sep 17 00:00:00 2001 From: colin-mueller-sonarsource <44168128+colin-mueller-sonarsource@users.noreply.github.com> Date: Thu, 27 Jun 2019 03:50:17 -0700 Subject: [PATCH] DOCS: Removed 5.6 / 6.0 - 6.6 references --- .../instance-administration/system-info.md | 348 ------------------ 1 file changed, 348 deletions(-) diff --git a/server/sonar-docs/src/pages/instance-administration/system-info.md b/server/sonar-docs/src/pages/instance-administration/system-info.md index b3d78dd0a54..68a1ba3eaf4 100644 --- a/server/sonar-docs/src/pages/instance-administration/system-info.md +++ b/server/sonar-docs/src/pages/instance-administration/system-info.md @@ -50,354 +50,6 @@ To control log rolling, use the `sonar.log.rollingPolicy` The System Info page gives you the ability to download your instance's current log files (log files rotate on a regular basis), and to tune the log level via controls at the top of the page. Changes made here are temporary, and last only until the next time the instance is restarted, at which point the level will be reset to the more permanent value set in _$SONARQUBE-HOME/conf/sonar.properties_. Regardless, if you change your log level _from_ `INFO`, but sure to change it back as soon as is practical; log files can get very large very quickly at lower log levels. ## Total Lines of Code - -### SonarQube 6.7 LTS and newer The number of Lines of Code (for licensing purposes) in an instance can be found in the **System** section of the System Info page on, and on the License page (**[Administration > Configuration > License Manager](/#sonarqube-admin#/admin/extension/license/app)** in commercial editions. If you're on a commercial edition and using Branch or PR analysis, rest assured that only lines from the single largest branch in a project are considered for licensing purposes. The Lines of Code in the rest of the branches are ignored. - -### Versions older than 6.7 -The best approach there is to query the database. The actual query varies based on the version of SonarQube and the database engine. Two queries are provided: - -* one query that counts LOCs across *all* projects -& one query that filters out project branches (i.e. projects analyzed with the `sonar.branch` parameter). However, this query is accurate only if projects with branches are also analyzed once without sonar.branch. - -**SonarQube LTS v5.6.x** - -[[collapse]] -| ## MySQL -| -|**Note** – Starting with version 7.9, SonarQube will no longer support MySQL. To migrate from MySQL to a supported database, see the [MySQL Migrator tool](https://github.com/SonarSource/mysql-migrator). -| -| Global LOCs -| ``` -| select sum(pm.value) as global_loc from projects p -| inner join snapshots s on s.project_id = p.id -| inner join project_measures pm on pm.snapshot_id = s.id -| inner join metrics m on m.id=pm.metric_id -| where s.islast = true -| and p.enabled = true -| and p.qualifier = 'TRK' -| and p.scope = 'PRJ' -| and p.copy_resource_id is null -| and pm.person_id is null -| and m.name='ncloc'; -| ``` -| LOCs without `sonar.branch` -|``` -| select sum(pm.value) as loc_without_branch from projects p -| inner join snapshots s on s.project_id = p.id -| inner join project_measures pm on pm.snapshot_id = s.id -| inner join metrics m on m.id=pm.metric_id -| where s.islast = true -| and p.enabled = true -| and p.qualifier = 'TRK' -| and p.scope = 'PRJ' -| and p.copy_resource_id is null -| and pm.person_id is null -| and m.name='ncloc' -| and ( -| INSTR(p.kee, ':') = 0 or not exists( -| select * from projects p_root where p_root.kee = SUBSTR(p.kee, 1, LENGTH(p.kee) - INSTR(REVERSE(p.kee), ':')) -| )); -|``` - -[[collapse]] -| ## PostgreSQL 8.0-9.0 -| Global LOCs -| ``` -| select sum(pm.value) as global_loc from projects p -| inner join snapshots s on s.project_id = p.id -| inner join project_measures pm on pm.snapshot_id = s.id -| inner join metrics m on m.id=pm.metric_id -| where s.islast = true -| and p.enabled = true -| and p.qualifier = 'TRK' -| and p.scope = 'PRJ' -| and p.copy_resource_id is null -| and pm.person_id is null -| and m.name='ncloc'; -| ``` -| LOCs without `sonar.branch` -| Not feasible on this specific database - -[[collapse]] -| ## PostgreSQL 9.1+ -| Global LOCs -| ``` -| select sum(pm.value) as global_loc from projects p -| inner join snapshots s on s.project_id = p.id -| inner join project_measures pm on pm.snapshot_id = s.id -| inner join metrics m on m.id=pm.metric_id -| where s.islast = true -| and p.enabled = true -| and p.qualifier = 'TRK' -| and p.scope = 'PRJ' -| and p.copy_resource_id is null -| and pm.person_id is null -| and m.name='ncloc'; -| ``` -| LOCs without `sonar.branch` -| ``` -| select sum(pm.value) as loc_without_branch from projects p -| inner join snapshots s on s.project_id = p.id -| inner join project_measures pm on pm.snapshot_id = s.id -| inner join metrics m on m.id=pm.metric_id -| where s.islast = true -| and p.enabled = true -| and p.qualifier = 'TRK' -| and p.scope = 'PRJ' -| and p.copy_resource_id is null -| and pm.person_id is null -| and m.name='ncloc' -| and ( -| POSITION(':' IN p.kee) = 0 or not exists( -| select * from projects p_root where p_root.kee = SUBSTRING(p.kee, 0, LENGTH(p.kee) - POSITION(':' in REVERSE(p.kee)) + 1) -| )); -| ``` - -[[collapse]] -| ## Oracle -| Global LOCs -| ``` -| select sum(pm.value) as global_loc from projects p -| inner join snapshots s on s.project_id = p.id -| inner join project_measures pm on pm.snapshot_id = s.id -| inner join metrics m on m.id=pm.metric_id -| where s.islast = 1 -| and p.enabled = 1 -| and p.qualifier = 'TRK' -| and p.scope = 'PRJ' -| and p.copy_resource_id is null -| and pm.person_id is null -| and m.name='ncloc'; -| ``` -| LOCs without `sonar.branch` -| ``` -| select sum(pm.value) as loc_without_branch from projects p -| inner join snapshots s on s.project_id = p.id -| inner join project_measures pm on pm.snapshot_id = s.id -| inner join metrics m on m.id=pm.metric_id -| where s.islast = 1 -| and p.enabled = 1 -| and p.qualifier = 'TRK' -| and p.scope = 'PRJ' -| and p.copy_resource_id is null -| and pm.person_id is null -| and m.name='ncloc' -| and ( -| INSTR(p.kee, ':') = 0 or not exists( -| select * from projects p_root where p_root.kee = SUBSTR(p.kee, 0, INSTR(p.kee, ':', -1) - 1) -| )); -| ``` - -[[collapse]] -| ## Microsoft SQL Server (a.k.a MSSQL) -| Global LOCs -| ``` -| select sum(pm.value) as global_loc from projects p -| inner join snapshots s on s.project_id = p.id -| inner join project_measures pm on pm.snapshot_id = s.id -| inner join metrics m on m.id=pm.metric_id -| where s.islast = 1 -| and p.enabled = 1 -| and p.qualifier = 'TRK' -| and p.scope = 'PRJ' -| and p.copy_resource_id is null -| and pm.person_id is null -| and m.name='ncloc'; -| ``` -| LOCs without `sonar.branch` -| ``` -| select sum(pm.value) as loc_without_branch from projects p -| inner join snapshots s on s.project_id = p.id -| inner join project_measures pm on pm.snapshot_id = s.id -| inner join metrics m on m.id=pm.metric_id -| where s.islast = 1 -| and p.enabled = 1 -| and p.qualifier = 'TRK' -| and p.scope = 'PRJ' -| and p.copy_resource_id is null -| and pm.person_id is null -| and m.name='ncloc' -| and ( -| CHARINDEX(':', p.kee) = 0 or not exists( -| select * from projects p_root where p_root.kee = SUBSTRING(p.kee, 0, LEN(p.kee) - CHARINDEX(':', REVERSE(p.kee)) + 1 ) -| )); -| ``` - -**SonarQube 6.0-6.6** -[[collapse]] -| ## MySQL -| -|**Note** – Starting with version 7.9, SonarQube will no longer support MySQL. To migrate from MySQL to a supported database, see the [MySQL Migrator tool](https://github.com/SonarSource/mysql-migrator). -| -| Global LOCs -| ``` -| select sum(pm.value) as global_loc from projects p -| inner join snapshots s on s.component_uuid = p.uuid -| inner join project_measures pm on pm.analysis_uuid = s.uuid -| inner join metrics m on m.id=pm.metric_id -| where s.islast = true -| and p.enabled = true -| and p.qualifier = 'TRK' -| and p.scope = 'PRJ' -| and p.copy_component_uuid is null -| and pm.component_uuid = p.uuid -| and pm.person_id is null -| and m.name='ncloc'; -| ``` -| LOCs without `sonar.branch` -| ``` -| select sum(pm.value) as loc_without_branch from projects p -| inner join snapshots s on s.component_uuid = p.uuid -| inner join project_measures pm on pm.analysis_uuid = s.uuid -| inner join metrics m on m.id=pm.metric_id -| where s.islast = true -| and p.enabled = true -| and p.qualifier = 'TRK' -| and p.scope = 'PRJ' -| and p.copy_component_uuid is null -| and pm.component_uuid = p.uuid -| and pm.person_id is null -| and m.name='ncloc' -| and ( -| INSTR(p.kee, ':') = 0 or not exists( -| select * from projects p_root where p_root.kee = SUBSTR(p.kee, 1, LENGTH(p.kee) - INSTR(REVERSE(p.kee), ':')) -| )); -| ``` - -[[collapse]] -| ## PostgreSQL 8.0-9.0 -| Global LOCs -| ``` -| select sum(pm.value) as global_loc from projects p -| inner join snapshots s on s.component_uuid = p.uuid -| inner join project_measures pm on pm.analysis_uuid = s.uuid -| inner join metrics m on m.id=pm.metric_id -| where s.islast = true -| and p.enabled = true -| and p.qualifier = 'TRK' -| and p.scope = 'PRJ' -| and p.copy_component_uuid is null -| and pm.component_uuid = p.uuid -| and pm.person_id is null -| and m.name='ncloc'; -| ``` -| LOCs without `sonar.branch` -| Not feasible on this specific database - - -[[collapse]] -| ## PostgreSQL 9.1+ -| Global LOCs -| ``` -| select sum(pm.value) as global_loc from projects p -| inner join snapshots s on s.component_uuid = p.uuid -| inner join project_measures pm on pm.analysis_uuid = s.uuid -| inner join metrics m on m.id=pm.metric_id -| where s.islast = true -| and p.enabled = true -| and p.qualifier = 'TRK' -| and p.scope = 'PRJ' -| and p.copy_component_uuid is null -| and pm.component_uuid = p.uuid -| and pm.person_id is null -| and m.name='ncloc'; -| ``` -| LOCs without `sonar.branch` -| ``` -| select sum(pm.value) as loc_without_branch from projects p -| inner join snapshots s on s.component_uuid = p.uuid -| inner join project_measures pm on pm.analysis_uuid = s.uuid -| inner join metrics m on m.id=pm.metric_id -| where s.islast = true -| and p.enabled = true -| and p.qualifier = 'TRK' -| and p.scope = 'PRJ' -| and p.copy_component_uuid is null -| and pm.component_uuid = p.uuid -| and pm.person_id is null -| and m.name='ncloc' and ( -| POSITION(':' IN p.kee) = 0 or not exists( -| select * from projects p_root where p_root.kee = SUBSTRING(p.kee, 0, LENGTH(p.kee) - POSITION(':' in REVERSE(p.kee)) + 1) -| )); -| ``` - - -[[collapse]] -| ## Oracle -| Global LOCs -| ``` -| select sum(pm.value) as global_loc from projects p -| inner join snapshots s on s.component_uuid = p.uuid -| inner join project_measures pm on pm.analysis_uuid = s.uuid -| inner join metrics m on m.id=pm.metric_id -| where s.islast = 1 -| and p.enabled = 1 -| and p.qualifier = 'TRK' -| and p.scope = 'PRJ' -| and p.copy_component_uuid is null -| and pm.component_uuid = p.uuid -| and pm.person_id is null -| and m.name='ncloc'; -| ``` -| LOCs without `sonar.branch` -| ``` -| select sum(pm.value) as loc_without_branch from projects p -| inner join snapshots s on s.component_uuid = p.uuid -| inner join project_measures pm on pm.analysis_uuid = s.uuid -| inner join metrics m on m.id=pm.metric_id -| where s.islast = 1 -| and p.enabled = 1 -| and p.qualifier = 'TRK' -| and p.scope = 'PRJ' -| and p.copy_component_uuid is null -| and pm.component_uuid = p.uuid -| and pm.person_id is null -| and m.name='ncloc' -| and ( -| INSTR(p.kee, ':') = 0 or not exists( -| select * from projects p_root where p_root.kee = SUBSTR(p.kee, 0, INSTR(p.kee, ':', -1) - 1) -| )); -| ``` - - -[[collapse]] -| ## Microsoft SQL Server (a.k.a. MSSQL) -| Global LOCs -| ``` -| select sum(pm.value) as global_loc from projects p -| inner join snapshots s on s.component_uuid = p.uuid -| inner join project_measures pm on pm.analysis_uuid = s.uuid -| inner join metrics m on m.id=pm.metric_id -| where s.islast = 1 -| and p.enabled = 1 -| and p.qualifier = 'TRK' -| and p.scope = 'PRJ' -| and p.copy_component_uuid is null -| and pm.component_uuid = p.uuid -| and pm.person_id is null -| and m.name='ncloc'; -| ``` -| LOCs without `sonar.branch` -| ``` -| select sum(pm.value) as loc_without_branch from projects p -| inner join snapshots s on s.component_uuid = p.uuid -| inner join project_measures pm on pm.analysis_uuid = s.uuid -| inner join metrics m on m.id=pm.metric_id -| where s.islast = 1 -| and p.enabled = 1 -| and p.qualifier = 'TRK' -| and p.scope = 'PRJ' -| and p.copy_component_uuid is null -| and pm.component_uuid = p.uuid -| and pm.person_id is null -| and m.name='ncloc' -| and ( -| CHARINDEX(':', p.kee) = 0 or not exists( -| select * from projects p_root where p_root.kee = SUBSTRING(p.kee, 0, LEN(p.kee) - CHARINDEX(':', REVERSE(p.kee)) + 1 ) -| )); -| ``` - - -- 2.39.5