How to list the event of the etw DX provider? - etw

I find a method that use wevtutil to get the publisher configuration information. For example i use commond "wevtutil gp Microsoft-Windows-DiagCpl /ge:true /gm:true /f:xml" . But when i use commond "wevtutil gp DX /ge:true /gm:true /f:xml", the result is "Failed to open metadata for publisher DX". It mean the DX is not a publisher, So i use "wevtutil ep" commond to list the all publisher, and i cant find DX. But I use commond "xperf -providers" to list all providers, and DX is contained. I want to know how to get the DX provider's configuration information.Help me .

The question was asked a year ago, but I just happened to see it now. Anyway, here goes...
Are you sure "DX" is the full name of the provider or the provider you're looking to get the metadata? Using logman, I see:
Microsoft-Windows-DxgKrnl
and Microsoft-Windows-DXGI
but not just "DX".
The mentioned wevtutil command works with two those providers.

Related

VaultSharp - How to generate a secret-id?

I'm currently using the latest version of VaultSharp in a project.
Can you tell me if it's possible to generate a secret-id using the library please?
Something along the lines of: vault write -force auth/apppole/role/myapp/secret-id
Thank you in advance
Darren
This capability will be available in the next Nuget publish of VaultSharp. I just added this feature last and it is checked in. It'll be available when I publish the next version in a week or so.
The feature is here: https://github.com/rajanadar/VaultSharp/blob/master/src/VaultSharp/V1/AuthMethods/AppRole/AppRoleAuthMethodProvider.cs#L67
Task<Secret<SecretIdInfo>> PullNewSecretIdAsync(string roleName,
PullSecretIdRequestOptions secretIdRequestOptions = null,
string mountPoint = AuthMethodDefaultPaths.AppRole);

vtkOBJImporter id to k3D

How does one access the (g) ID of the obj from the k3d scene objects which I have passed from vtkOBJImporter using the method outlined here.
(g) should be the group name. However I could't find documentation of vtk of where the group name is stored once it is imported by vtkOBJImporter.
.OBJ
From the current source code (https://gitlab.kitware.com/vtk/vtk/-/blob/master/IO/Import/vtkOBJImporter.cxx#L275), it seems the g type is not handle by the vtkOBJImporter.
Feel free to open a feature request (https://gitlab.kitware.com/vtk/vtk/-/issues/new?issue[assignee_id]=&issue[milestone_id]=). Or even a merge request :)

How can I automatically close stale issues in GitLab?

Is there an out of the box feature to automatically close issues that have not had any activity for a specific period of time e.g. 4 weeks?
If not, what would be the best way to go about implementing this for my Group's issues?
It does not exist per se but you can prepare a script to run into a cronjob or similar tool, so you regularly clean these issues. The script could use the GitLab Issue API, and check issue dates to determine whether to close a specific issue or not. The API has all the required tools for you to make this script with the described logic.
I'm not familier with such option but you can look into Issues list and sort by created or updated.
This solution uses the python-gitlab package. It gets all group issues, adds a comment to those that have been inactive and closes them.
Only prerequisites are to
get a PRIVATE_TOKEN and add it to your environment
find out your group ID and add it below
import datetime
import os
import gitlab
stale_before = datetime.date.today() - datetime.timedelta(days=28)
gl = gitlab.Gitlab(
url="https://gitlab.example.com", private_token=os.environ["PRIVATE_TOKEN"]
)
group = gl.groups.get(123) # your group ID
issues = group.issues.list(all=True, state="opened")
for issue in issues:
updated_at = datetime.datetime.fromisoformat(issue.updated_at).date()
if updated_at < stale_before:
print(f"Closing issue #{issue.iid} (last activity on {updated_at}).")
issue.notes.create({"body": "Closing for inactivity."})
issue.state_event = "close"
issue.save()

Get a gid if you know the group name in Go

I created a group on a Linux machine. Now I am trying to call os.Chown to change a file's ownership to that new group.
os.Chown requires me to know the uid and the gid:
func Chown(name string, uid, gid int) error
How can I get the gid for my group? I tried using user.Lookup("groupname"), but I got "unknown user groupname"
I can call os.Getgroups, but this only returns me an array of group IDs - it doesn't tell me anything about the mapping between a group name and the group id.
I am guessing there is a Unix utility I can shell out to (parse the result of calling id) but I'd rather not do that if I can help it.
Update: As of August 16, 2016, Go 1.7 is released with support for LookupGroup. Upgrading to Go 1.7 is recommended if you want to access information about POSIX groups.
There is a LookupGroup function in the Go 1.7 betas, but it was added only this February and isn't in any released version of Go, so you're kind of out of luck.
As far as I can see your options are:
Upgrade to a beta.
Wait for the 1.7 release, scheduled for August.
Write your own cgo function that calls getgrnam for the information you need (tricky)
Write your own code that parses /etc/group (relatively easy... as long as you can guarantee that the info you need actually comes from that file and not LDAP or something).

MKS Integrity: Getting content of archive (dropped member)

I know that I can use the CLI command si viewrevision to get the content of a versioned file. Downside is that this file must not be dropped.
Does anyone know a way (other than addfromarchive) to get the content when knowing the archive?
I don't believe this is possible
si projectco is documented as "checks out members of a project into working files". If you drop the member from the project, it is no longer part of the project.
At first blush, si viewrevision doesn't explicitly state in the documentation that it requires a project, but if you try to run the command without a project (or a sandbox, which implies a project), you will be prompted for one. Failing to provide one at the prompt exits the command with the message 'A value for "--project" is required.' I tried doing this specifying a change package ID which the member was part of, and that still doesn't work.
Your si addfromarchive option is the only published way to do this.
Disclosure: I am a PTC employee.
Why not use add from archive?
You could also use a temporary server location (S:/Server/prj_tmp/project.pj)
as destination and the member will stay dropped in the original project.
(Ok, ok, someone could create a sandbox from S:/Server/prj_tmp/project.pj and generate new versions in the archive of the dropped member, ad/delete labels ...)
There might be another possibility if your project has a checkpoint where the file was not yet dropped.
Just create a build sandbox with the project revision of that checkpoint and then:
C:\BuildSandboxes\prjA\src> si viewrevision ..... :)
.
You might also use something like
C:\Sandboxes\prjA\src> si configuresubproject --subprojectRevision=1.2 --type=build project.pj
view your revision and then go back with
C:\Sandboxes\prjA\src> si configuresubproject --type=default project.pj
but this might affect user that are currently working on the project. (eg. they would not be able to check in while the subproject is configured as build)

Resources